home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / tas407.zip / TAS.TXT < prev    next >
Text File  |  1991-09-14  |  153KB  |  4,350 lines

  1. Technical 
  2. Analysis 
  3. Scanner
  4. TAS
  5. Users Guide and Referenc
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12. FlexSoft
  13. 7172 Regional Street, #276
  14. Dublin, CA 94568
  15. Voice        510-829-9733
  16. FAX         510-829-9733,,,22#
  17. BBS         510-829-2293
  18.  
  19.  
  20.  
  21.  
  22. This document and all accompanying written and disk 
  23. based notes and specifications are copyrighted by 
  24. FlexSoft.
  25.  
  26.  
  27.  
  28. September 14, 1991
  29.  
  30.  
  31. Table of Contents
  32.  
  33. Table of Contents    v
  34. Introduction    1
  35. Taking Care of Business    3
  36. System Requirements    3
  37. Hardware    3
  38. Software    3
  39. Registration    3
  40. How to Register    4
  41. Registration Fee    5
  42. A Short Description of PML (Prodigy Metastock Loader)    5
  43. A Short Description of PDL (Prodigy Down Loader)    5
  44. Support    6
  45. Redistribution of TAS    6
  46. Credits    7
  47. Disclaimers    7
  48. Technical Analysis References    7
  49. Installing and Running TAS    9
  50. Quick Start Installation    9
  51. Creating and Running a Sample Selection    10
  52. Starting TAS    11
  53. Running TAS    13
  54. Special Keys within TAS    14
  55. CONFIGURE TAS - Configuration and Setup    14
  56. DATA DIRECTORY(S)    15
  57. INCLUDE TICKER PERIOD    16
  58. SYMBOL TABLE SIZE    17
  59. QUOTES PER SYMBOL    17
  60. Use EMS Arrays    18
  61. REGISTRATION CODE    18
  62. DEFINE TICKER LIST    19
  63. BUILD OR RUN SELECTION    20
  64. Selection Build Options    22
  65. Index Ticker    22
  66. Maximum Quotes    22
  67. Start Date    22
  68. End Date    22
  69. Running Your Selection    23
  70. Sorting on Selected Columns    23
  71. Printing Your Selection Report    23
  72. Errors In Selection Formulas    23
  73. BUILD OR RUN PROFIT TEST    25
  74. Profit Test Option Settings    26
  75. Initial Cash    26
  76. Test Type    27
  77. Commissions    27
  78. Share Purchases    27
  79. Price Slippage    28
  80. Output File Name    28
  81. Report Detail    28
  82. Maximum Quotes    28
  83. Index Ticker    29
  84. Reinvest Profits    29
  85. Start Date    29
  86. End Date    29
  87. Running the Profit Test    29
  88. EDIT TAS SCRIPT - Editing TAS Scripts    30
  89. Editor Function Keys    31
  90. RUN TAS SCRIPT - Running TAS Scripts    33
  91. QUIT    33
  92. TAS Selection Scripts -  Description    35
  93. TAS Script Language    37
  94. Syntax    37
  95. Building Blocks    38
  96. Variables    40
  97. TAS Variable Types    41
  98. "String" Variables    41
  99. "Numeric" Variables    41
  100. "Numeric Array" Variables    41
  101. Assignment Statement    44
  102. Arithmetic Operators    45
  103. Functions    45
  104. IF Statements    46
  105. BEGIN..END Statement    47
  106. GOTO Statement and LABELS    48
  107. GOSUB statement    49
  108. RETURN statement    50
  109. Logical Operators    51
  110. Relational Operators    52
  111. Comments    52
  112. Pre-Defined Variables    52
  113. Pre-Defined DATA Arrays    54
  114. Pre-defined Functions    57
  115. Technical Indicators available in Metastock    57
  116. ad()    Accumulation/Distribution    57
  117. adx(p)    Average Directional Movement    57
  118. adxr(p)    Average Directional Movement Rating    57
  119. add(a,b)    Add two arrays    57
  120. cci(p)    Commodity Channel Index Array    57
  121. co()    Chaikin's Oscillator    58
  122. cos(a)    Trigonometric cosine    58
  123. cum(a)    Cumulative Sum of Array "a"    58
  124. div(a,b)    Divide two arrays    58
  125. dmi(p)    Directional Movement Index    58
  126. exp(a)    Exponential Function    58
  127. hhv(a,p)    Highest High Value    58
  128. llv(a,p)    Lowest Low Value    58
  129. log(a)    Exponential Logarithm of each entry in 
  130. array 'a'    58
  131. macd()    Moving Average Convergence/Divergence
  132.     58
  133. mdi(p)    Minus Directional Movement (-DI)    58
  134. mo(p)    Momentum Array    58
  135. mov(d,p,t)    Compute Moving Average    58
  136. mul(a,b)    Multiply two arrays    59
  137. neg(a)    Negative of Array "a"    59
  138. nvi()    Negative Volume Indicator    59
  139. obv()    On Balance Volume    59
  140. oscp(p1,p2,t,r)      Price Oscillator    59
  141. oscv(p1,p2,t,r)     Volume Oscillator    59
  142. pdi(p)    Positive Directional Movement (+DI)    60
  143. per()    Performance Indicator    60
  144. pvi()    Positive Volume Indicator    60
  145. rsi(p)    Wilder's Relative Strength Indicator    60
  146. roc(d,p,r)    Rate Of Change Array    60
  147. sar(i,m)    Wilder's Parabolic Stop and Reverse (SAR)
  148.     60
  149. sin(a)    Trigonometric sine of each entry in array 'a'
  150.     60
  151. sqrt(a)    Square root of each entry in array 'a'    60
  152. std(d,p)    Statistical Standard Deviation.    60
  153. stoch(p,s)    Stochastic Oscillator    61
  154. sub(a,b)    Subtract one array from another    61
  155. sum(a,p)    Summation of array over period    61
  156. tan(a)    Trigonometric tangent    61
  157. trix(p)    TRIX Function    61
  158. tsf(a,p)    Time Series Forecast  function.    61
  159. var(d,p)    Statistical VARIANCE    61
  160. vol(pm,pr)    Volatility Indicator.    61
  161. wc()    Weighted Close    61
  162. willa()    William's Accumulation/Distribution.    61
  163. willr(p)    William's %R    61
  164. zig(a,r,t)    Zig Zag Function    62
  165. TAS Functions    62
  166. angle(a)    Angle of a line    62
  167. alpha()    Alpha function    62
  168. avgprc()    Average Price    63
  169. bbandt(p,s)    Top Bollinger Band    63
  170. bbandb(p,s)    Bottom Bollinger Band    63
  171. beta(r)    "Beta" function    63
  172. corrcoef()    Correlation Coefficient    64
  173. datestr(d)    Create a formatted date    64
  174. daymon(d)    Day of Month function    64
  175. daywk(d)    Day of Week function    64
  176. divby(a,x)    Divide array by number    64
  177. dump_array(a1,a2...aN) Dump Array Contents    65
  178. int(x)    Create Integer    65
  179. isect(a,b)     Find array intersection    65
  180. linreg    Linear Regression over time    65
  181. linreg2    Linear Regression of two variables    66
  182. load(t,f)    Load a data array    66
  183. mfi(p)    "Money Flow Index"    67
  184. month(d)    Month function    67
  185. mulby(a,x)      Multiply by number    67
  186. over(a,b)    Over function    67
  187. peak(a,n)    Find Peak in Array    67
  188. per1(a)    Performance using Array    68
  189. set(a,v)    Set Array to Value    68
  190. slope(a)    Slope of Line    68
  191. trough(a,n)    Find Trough in Array    69
  192. tr()    Wilder's True Range    69
  193. year(d)    Year function    69
  194. zero(a)    Zero Array    69
  195. Output Functions    71
  196. WRITE and WRITELN Output Functions    71
  197. SORT Functions    71
  198. SORTOUT    72
  199. SORTON    73
  200. SORTGET    73
  201. SORTPRINT    74
  202. Column Headings    75
  203. Profit Test Statements    77
  204. PLOT statement: Define Technical Indicators    77
  205. BUY WHEN - Define BUY Conditions    78
  206. SELL WHEN - Define SELL Conditions    78
  207. STOP (LONG or SHORT) Condition    79
  208. TAS Profit Tester Functions    80
  209. Profit Test Phases - Advanced Use Only    81
  210. GRAPH Functions    83
  211. OPENGRAPH    83
  212. SIZEGRAPH    83
  213. GRAPH    84
  214. DRAWLINE    84
  215. CLOSEGRAPH    85
  216. GRAPH EXAMPLES    85
  217. TAS "POUND" (#) Commands    89
  218. OUTPUT_FILE Command    89
  219. Appending to Output File    90
  220. Suppressing TAS Report Heading    90
  221. MAX_QUOTES Command    90
  222. SCAN_DATE Command    91
  223. PROFIT_TEST Command    92
  224. INDEX Command    92
  225. INCLUDE Command    93
  226. TAS Script Examples    95
  227. Putting Them Together    95
  228. New High/New Low Example    96
  229. Script Contents    97
  230. Script Output    97
  231. TICKER Symbol Processing    98
  232. Script Contents    98
  233. Directional Movement Example    99
  234. Script Contents    99
  235. Script Output    101
  236. Modified "Binary Wave"    101
  237. Profit Test Example Using RSI(14)    101
  238. Script Contents (RSIPT.TAS)    101
  239. Script Output    102
  240. TAS Error Message    104
  241. Error Messages    104
  242. Diagnostic Actions    125
  243. Index    127
  244.  
  245.  
  246. Introduction
  247.  
  248. "Technical Analysis Scanner" (TAS) is a software program that 
  249. lets you analyze your MetaStock, Computrac, Investograph Plus 
  250. or ChartPro data base using technical analysis indicators and 
  251. conditional relationships to "scan" all, or a portion, of your data 
  252. files. TAS also contains a Profit Testing Facility with which you 
  253. can "back test" your historical data using nearly any trading 
  254. strategy to see how profitable it would have been. 
  255.  
  256. TAS is a generalized technical analysis "tool box". It is not a 
  257. "black box" system where you have no knowledge of the rules 
  258. or  control over its decision making process.  With TAS,  you 
  259. have complete control over the indicators chosen, their 
  260. interpretation, and the output formatting of your reports. 
  261.  
  262. With TAS, you can combine over 60 built-in technical indicators, 
  263. compare their values against other indicators or values, make 
  264. decisions based on the result of those comparisons, and 
  265. ultimately, create a report which shows you what you want to 
  266. see.
  267.  
  268. TAS is designed to enable you to go beyond the MetaStock Pro 
  269. "Custom Formulas" by applying similar analysis to all, or any 
  270. part of, the data in your Metastock (or ChartPro) Data Base. If 
  271. you have a trading strategy  that relies on technical indicators or 
  272. price action, but you do not have the time to chart all of your 
  273. stocks everyday, then TAS is the tool you need. It runs your 
  274. own customized formula on selected groups of your stocks, and 
  275. can notify you if your buy or sell condition is reached. 
  276.  
  277. TAS can also be used to create custom reports on your stocks. 
  278. For example, you can use it to notify you when a particular 
  279. stock has reached a certain price, volume or technical indicator 
  280. value. 
  281.  
  282. And with the Profit Tester feature  you can confirm the 
  283. profitability of your trading system. TAS goes back through 
  284. your historical data, a day at a time, applying your trading rules 
  285. to the indicators and conditions you specify. It keeps track of 
  286. the days you bought, sold or were stopped out of positions, 
  287. tabulating the results on a daily basis, or in a summary report 
  288. which tells you how your system performed.
  289.  
  290.  
  291.  
  292. Taking Care of Business 
  293. System Requirements
  294. In order to use TAS, you should have the following software 
  295. and hardware configuration.
  296.  
  297. Hardware
  298. Any IBM PC processor type (8088, 8086, 80x86)
  299. A CGA, EGA, or VGA Monitor (EGA or VGA required for 
  300. Charts)
  301. Hard Disk (optional)
  302. Microsoft or Logitech Mouse (optional)
  303. 512K minimum memory (640K better)
  304.  
  305.  
  306. Software
  307. DOS 2.1 or later
  308. "Computrac" Format historical data files  used by 
  309. Metastock, Investograph Plus, and Computrac, among 
  310. others
  311.     or
  312. ChartPro or Megatech data files
  313.     
  314. Registration 
  315. TAS is the product of over 1,000 hours of  research,  design and 
  316. programming . The registration fee is reasonable for a technical 
  317. analysis package  with  the power and flexibility of TAS. In fact, 
  318. it compares well with programs costing much more . 
  319. As an addition to Metastock or Chartpro, TAS provides the 
  320. missing link between visual analysis and computerized alert 
  321. systems. 
  322.  
  323. The  TAS package is distributed as a TRIAL version. The TRIAL 
  324. version of TAS has the following restrictions:
  325.  
  326.      Only 20 TICKER symbols will be accessed from a 
  327. "TICKER LIST"
  328.      TAS cannot be run from a batch file as a DOS command
  329.      You cannot redirect the output from the TAS reports 
  330. into a file or to the printer.
  331.      Only one TICKER can be used with the Profit Test 
  332. feature 
  333.      The functions listed below may not be available in the 
  334. TRIAL version.
  335. Directional Movement    PDI, MDI, DX, ADX, ADXR
  336. Linear Regression     LINREG, LINREG2, 
  337. CORRCOEF, ANGLE, SLOPE, 
  338. BETA
  339. Miscellaneous         VOL(ability) PEAK, TROUGH
  340.  
  341. When you register TAS, you will receive a "REGISTRATION 
  342. CODE" that will enable the full set of TAS features. 
  343.  
  344. You will find that running TAS from a batch file and placing the 
  345. reports into a file for inspection is more convenient on a 
  346. day-to-day basis than running the program interactively. This 
  347. particular feature, as well as the ability to scan up to 2000 stocks 
  348. in one run, should encourage you to register your version of 
  349. TAS.
  350.  
  351. Your registration entitles you to support for TAS problems, 
  352. answers to your questions and requests for new indicators. 
  353. How to Register
  354. In order to become a registered user of TAS, please fill out the 
  355. form contained in the file REGISTER.DOC and mail it to: 
  356.  
  357. FlexSoft
  358. 7172 Regional St, #276 
  359. Dublin, CA 94568
  360.  
  361. Registration Fee
  362. See the file REGISTER.DOC for pricing and ordering 
  363. information. Certain releases of TAS may  be defined as 
  364. "upgrade releases". An Upgrade Release will require a new 
  365. Registration Code and  an Upgrade Registration Fee. When a 
  366. major feature is added to TAS, there will be a "feature upgrade" 
  367. cost as well.  
  368.  
  369. FlexSoft also has two companion products for users who wish 
  370. to order them. The first product is called PML and the second is 
  371. called PDL. With the combination of TAS, PML and PDL, you 
  372. have "end to end" access to your stock market data. PDL 
  373. downloads the quotes, PML updates the database, and TAS 
  374. allows you to search, analyze, report, and chart the data.  PML 
  375. and PDL are described below.  
  376.  
  377. Each of these programs can be ordered from FlexSoft or 
  378. downloaded from GEnie or Compuserve. 
  379. A Short Description of PML (Prodigy Metastock Loader) 
  380. PML converts quotes from GEnie, DowJones, Prodigy and 
  381. Compuserve  into MetaStock data files and an ASCII format for 
  382. input to spreadsheets. PML produces summary reports on all 
  383. your Metastock files whether you update the files with PML or 
  384. not. Colors are used to highlight those stocks which exceed 
  385. either PRICE or VOLUME limits you set in the installation 
  386. procedure. PML also creates a Summary Report file.  
  387. A Short Description of PDL (Prodigy Down Loader)
  388. PDL is a program that downloads, or captures, daily quote data 
  389. from the Prodigy Information Service. PDL can download up to 
  390. 1,000 daily quotes in a single run. If you need to download 
  391. more quotes, then you can run PDL several times. It uses the 
  392. Quote Check feature of Prodigy to obtain the quotes, so there is 
  393. no need to go into Prodigy and enter the quotes by hand, as 
  394. some systems require you do. The creation of the ticker list of 
  395. quotes to download can be done with a simple TAS script.
  396. Support
  397.  
  398. You can get support for TAS problems or questions by 
  399. contacting me at my mailing address (above) or by Email on the 
  400. following services:
  401.  
  402. GEnie 
  403.  M.MOORE41
  404.  
  405. Prodigy
  406.  JBMD65A
  407.  
  408. Compuserve
  409.  76447,2367
  410.  
  411.  
  412. If you need a new version of TAS, it will ALWAYS be available 
  413. on the FlexSoft BBS at 415-829-2293. Other sources, such as 
  414. GEnie, Compuserve, and other BBS's may be one (or more) 
  415. release(s) behind the latest. 
  416.  
  417. You  can obtain  updates to TAS from the FlexSoft BBS or by 
  418. U.S. Mail (not including shipping and handling). If you need an 
  419. update by U.S. Mail, please send $5 for shipping and handling 
  420. in addition to any Upgrade  Registration Fee, if applicable.
  421. Redistribution of TAS
  422. You may (and are encouraged to) re-distribute TAS to other 
  423. BBS systems as long as you redistribute the entire unmodified 
  424. package as you received it. You may not redistribute your 
  425. registration code along with the package, nor may you transfer 
  426. it or give it away to anyone else . 
  427. Credits 
  428. MetaStock Professional is a stock charting program from Equis 
  429. Inc.
  430.  
  431. ChartPro is a stock charting program written by David Rettger.
  432.  
  433. GEnie is a trademark of General Electric Co.
  434.  
  435. Prodigy is a trademark of Prodigy Services Co. 
  436.  
  437. Disclaimers
  438. The author claims no responsibility for any damages caused by 
  439. the use or misuse of this product. This product is distributed "as 
  440. is" with no warranty expressed or implied.  The author will not 
  441. be responsible for any losses incurred, either directly or 
  442. indirectly, by the use of this product. 
  443.  
  444. The author reserves the right to make modifications at any time.  
  445. Prices are subject to change without notice.
  446.  
  447. Technical Analysis References
  448. The Encyclopedia of Technical Market Indicators, Colby & 
  449. Meyers, Dow Jones Irwin Press, 1988, ISBN 1-55623-049-4
  450. New Concepts in Technical Trading Systems, J. Welles Wilder 
  451. Jr., Trend Research, 1978, ISBN 0-89459-027-8
  452. The New Commodity Trading Systems and Methods, Perry J. 
  453. Kaufman, John Wiley and Sons 1987, ISBN 0-471-87879-0
  454. Metastock Professional Users Guide, Equis International
  455.  
  456.  
  457. Installing and Running TAS 
  458. TAS is distributed as an LHARC compressed collection of files. 
  459. The name of the .EXE file will be based on the version and 
  460. release level of TAS. For version 3, release 60, the name will be 
  461. 'TAS360.EXE', and in general, the name will be 'TASvrr.EXE' 
  462. where 'v' is the Version and 'r' is the Release. 
  463. Quick Start Installation
  464. The following "quick start" documentation shows how to get 
  465. TAS up and running on your system initially. The file name for 
  466. the TAS file is referred to as "TASvrr.EXE".
  467.  
  468. In order to install TAS, you should perform the following steps
  469.  
  470. 1.    Create a directory to contain TAS software. It can be 
  471. any name you choose. The following instructions 
  472. assume the subdirectory name is "\TAS". To create a 
  473. directory named \TAS on your C: drive, type "MD 
  474. C:\TAS"
  475. 2.    If you received TAS on a floppy disk, copy TASvrr.EXE 
  476. into directory \TAS  by typing
  477.         COPY A:\TAS\TASvrr.EXE C:\TAS
  478. 3.    CD \TAS
  479. 4.     Type TASvrr, e.g, if the file is TAS359.EXE, type 
  480. 'TAS359'
  481. 5.    Type TAS  and press ENTER.
  482. 6.    You will be presented with an initial screen which tells 
  483. you that you have not run TAS before. There are 
  484. flashing areas at the bottom to remind you that the F1-
  485. key is the Help key.  Hit the ESC key after reading the 
  486. message.  You will see another message indicating you 
  487. have a trial version of TAS. Once again, hit the ESC key 
  488. to move to the next screen.
  489. 7.    You will now be placed in the  "Configure TAS" menu 
  490. screen. Fill in the MSP or Chartpro directory names you 
  491. want to scan. You can enter up to 10 subdirectories and 
  492. then hit F3 to save the directories you named.
  493.  
  494. TAS is now installed .  The following section shows how to do a 
  495. build and run a simple selection that will perform the same 
  496. function as the Metastock Utility Rank feature.
  497.  
  498. Creating and Running a Sample Selection
  499. 1.    Go to the Define Ticker List Menu by either typing "T" 
  500. or moving the cursor bar down to that selection and 
  501. pressing ENTER. If you have a mouse, you can click on 
  502. the menu item.
  503. 2.    Select New Ticker List from the next prompt. 
  504. 3.    Give the name "MYTICKS" . This will be the name of a 
  505. ticker list for testing.
  506. 4.    After a moment, TAS will present you with a list of all 
  507. the tickers it found in the Data Directories you defined 
  508. in the Configure TAS screen. Move the cursor to each 
  509. ticker symbol you want to run a script against. Hit the 
  510. SPACE bar on the symbol.  It should highlight 
  511. (indicating it is selected). Hit F3 when all desired 
  512. symbols are selected. This will save the ticker list you 
  513. just created. 
  514. 5.    At the Main Menu, select Build or Run Selection by 
  515. typing "B"
  516. 6.    Select Use Old from the Build or Run Selection Menu
  517. 7.    Pick the selection MSURANK.SEL (by typing "M" or 
  518. moving the cursor to it) and hitting ENTER.
  519. 8.    Hit the F4 function key to "RUN" the MSURANK 
  520. selection script. TAS will now display a screen 
  521. containing all the ticker lists available to use. You will 
  522. be asked which ticker list you wish to use when you run 
  523. this script.
  524. 9.    Pick the ticker list you just created "MYTICKS.TCK" by 
  525. moving the cursor or mouse to the file name and 
  526. pressing ENTER or clicking on the filename.  This 
  527. particular selection  will create a report like the one 
  528. Metastock Utility (MSU) creates when you select "Rank" 
  529. using a 26 day Rate of Change and a 10 day Moving 
  530. Average.
  531. 10.    Now TAS runs the script with the ticker symbols you 
  532. put in the ticker list. As each ticker is processed, you 
  533. will see a line in the "run" window. Once all tickers are 
  534. processed, the report will be presented on the screen, 
  535. sorted by ticker. 
  536. 11.    Hit F1 now to see the choices you have. By hitting F1, 
  537. you can read the help and see what you can do from 
  538. here. You can sort your tickers on the value of any 
  539. column shown, either ascending or descending order. 
  540. To sort on the values in the second column, press the 
  541. key sequence Alt-2 (hold the ALT key and hit the 
  542. number 2). 
  543. 12.    To exit from the report screen, hit the ESC key. 
  544.  
  545. The documentation for the system is in the online help file 
  546. available by hitting the F1 key at any time.
  547. Starting TAS 
  548. You can start TAS in "MENU MODE" by simply typing "TAS" 
  549. by itself. TAS has switches available which you can specify on 
  550. the command line. They are:
  551.  
  552. -c    Eliminate CGA "snow"
  553.  
  554. -b    Use BIOS to write to video screen. This may be 
  555. necessary on some systems which are not 100% 
  556. compatible.
  557.  
  558. -m    Use Monochrome color scheme
  559.  
  560. If you are a registered user of TAS, you can also start TAS in 
  561. "batch mode" by specifying the name of a SCRIPT and the 
  562. Ticker List on the command line. So, if you had a TAS script 
  563. named "SELECT.TAS" and a Ticker List named 
  564. "MYSTOCK.TCK", you could run the SELECT script against the 
  565. stocks in the list MYSTOCK by typing:
  566.  
  567.     TAS SELECT MYSTOCK
  568.  
  569. If you wanted TAS to process all of the stock symbols (Tickers) 
  570. in your data base, you can omit the Ticker List name.
  571.  
  572. If you need to use the video flags mentioned above, they 
  573. should be specified prior to the name of the script file.
  574.  
  575. Running TAS
  576. The TAS Main Menu contains a screen which has all the options 
  577. you can choose when you work with TAS. The Main Menu 
  578. looks like the figure below.
  579.  
  580. The following sections will describe each of the options 
  581. accessible from the Main Menu.
  582.  
  583.             Technical Analysis Scanner (TAS v.rr) Copyright 1991, 
  584.                 Main Menu                 
  585.  
  586.  
  587.                 Configure TAS                                       
  588.  
  589.                 Define Ticker List                                  
  590.  
  591.                 Build or Run Selection                              
  592.  
  593.                 Build or Run Profit Test                            
  594.  
  595.                 Edit A TAS Script                                   
  596.  
  597.                 Run TAS Script                                      
  598.  
  599.                 Quit                                                
  600.  
  601.  
  602. [F1]=Help               Select Choice               [ESC]=Quit   
  603.  
  604. Special Keys within TAS
  605.  
  606. F1     The F1 key is the HELP Key. This key will cause 
  607. a help screen to be display when you press it. 
  608. The help topic will be for the current cursor 
  609. location (i.e., "context sensitive help").
  610.  
  611. ALT-X    The ALT-X key will exit from TAS to DOS. This 
  612. will allow you to do a few things outside of 
  613. TAS. Because TAS is a large program, you 
  614. won't have a a great deal of storage left when  
  615. you exit to DOS. To return to TAS from DOS, 
  616. type "EXIT".
  617.  
  618. ALT-M    The ALT-M key will tell you how much 
  619. memory is available to TAS and the maximum 
  620. size used of the SYMBOL TABLE.
  621.  
  622. ESC    The ESC key will always leave the screen or 
  623. prompt you are in and  immediately "pop" you 
  624. back to the previous menu. 
  625.  
  626. CTRL-BRK The CTRL-BRK key can be used to stop a TAS 
  627. when it is running. Any other key pressed 
  628. during the execution of a TAS script will cause 
  629. the display to pause, awaiting another key 
  630. press.
  631. CONFIGURE TAS - Configuration and Setup 
  632. The Configuration Menu is used to tell TAS the location of your 
  633. Metastock or ChartPro Data Directory(ies). Up to ten directories 
  634. can be processed at one time.
  635.  
  636. The configuration menu looks like this:
  637.                 TAS Configuration and Setup
  638.                                                                                                
  639.                                                                            
  640.     1st Data DIRECTORY      \MSPTEST\DATA                                   
  641.     2nd Data DIRECTORY                                                 
  642.     3rd Data DIRECTORY                                                  
  643.     4th Data DIRECTORY                                                  
  644.     5th Data DIRECTORY
  645.         .
  646.     10th Data DIRECTORY
  647.  
  648.  
  649.     Include Ticker Period
  650.  
  651.     Symbol Table Size 9000  Quotes per Symbol   50   Use EMS Arrays Y                
  652.                                                                            
  653.     Your Name              John Doe                            
  654.     Registration Code      02125F3012                                       
  655.  
  656.  
  657. DATA DIRECTORY(S)
  658. You should fill in the names of your Metastock or ChartPro 
  659. Directories, one per line above. Be sure to include the full path 
  660. name, including the first backslash character. If you have more 
  661. than one directory of data files, you can enter the other 
  662. directory names on the second thru tenth lines. 
  663.  
  664. You cannot intermix directories across products. In other 
  665. words, all 10 of your directories must be either Metastock 
  666. format or ChartPro format. TAS determines the type of 
  667. directory by first looking for a file named "MASTER" in the 
  668. first directory. If found, it assumes all  directories are 
  669. Metastock format. If not found, it looks for files ending 
  670. with ".PRO". If these are found, it assumes that all 
  671. directories are ChartPro data. If neither search is satisfied, 
  672. TAS issues an error message and requests that you change 
  673. the directory name.
  674.  
  675. If you have more than 10 Metastock format directories, you can 
  676. add the 11th through the 20th directory names in the file 
  677. TAS.CNF manually with an editor by adding lines like the one 
  678. below:. 
  679.     MSP_DATA_DIRxx = \MSPTEST\DATA_A_E 
  680. where xx is 10 to 19 for the eleventh through the twentieth 
  681. directory.
  682.  
  683. INCLUDE TICKER PERIOD
  684. This parameter should be set to "Y" if you have multiple tickers 
  685. with the same ticker symbol but different "periods". For 
  686. example, if you have a DAILY and a WEEKLY file for the 
  687. symbol AAPL, you will need to set this value to "Y" in order to 
  688. distinguish between the daily and weekly ticker files. 
  689.  
  690. If you have TICKER LISTS created with this value set to "Y", 
  691. they will not work if you change this value to "N" (and vice 
  692. versa). You will have to re-select the tickers again. TAS is 
  693. distributed with this value unset (which means "No").
  694.  
  695. SYMBOL TABLE SIZE
  696. The SYMBOL TABLE SIZE parameter is a "tuning" value which 
  697. determines the size of the internal tables for TAS. You may need 
  698. to increase the value if you write a particularly long or complex 
  699. selection script. If you specify any value less than 9000, TAS will 
  700. use 9000 as the value. 
  701.  
  702. NOTE: From time to time, as more functions are added to TAS, 
  703. there is a natural increase in the SYMBOL TABLE SIZE needed 
  704. for TAS functions. So, it may be the case that your symbol table 
  705. is adequate for an earlier release of TAS, but needs to be 
  706. increased for a new release. Try adding a couple of thousand to 
  707. whatever value you currently have until your script works. 
  708.  
  709. If you want to see the amount of SYMBOL TABLE your TAS 
  710. scripts are using, you can type the ALT-M key to display the 
  711. memory usage of TAS. One of the values shown is the 
  712. maximum SYMBOL TABLE SIZE used so far.
  713. QUOTES PER SYMBOL
  714. The QUOTES PER SYMBOL parameter specifies how many 
  715. quotes you want TAS to read into memory when performing 
  716. the selection. The higher this number, the longer the selection 
  717. will take. 
  718. See the section below under Use EMS Arrays for the effect of 
  719. this setting on the usage of EMS memory and processing time.
  720. This parameter has a very significant impact on the processing 
  721. time that TAS uses for each symbol. It should be set to as low 
  722. a value as possible (based on the time periods you use in your 
  723. indicators) so that the TAS processing is minimized.
  724. Use EMS Arrays
  725. If you have EMS (Expanded Memory) or XMS (eXtended 
  726. Memory) installed with suitable driver software , you can set 
  727. this value to Y to take advantage of the extra memory you have 
  728. above the 640K DOS limit. 
  729.  
  730. Most systems today do not actually have EMS memory., but 
  731. instead have Extended Memory (XMS), the kind that is built-in 
  732. to new 386 and 486 systems. The term EMS actually refers to a 
  733. software/hardware standard that is emulated by driver 
  734. programs from various vendors, such as QuarterDeck Office 
  735. Systems (QEMM and DesqView/386) as well as Microsoft's 
  736. EMM386 program.
  737.  
  738. TAS will automatically determine if you have EMS memory 
  739. installed, and if so, it will always use that memory for a 
  740. "swapping area", reducing the amount of disk reads required to 
  741. run the program. 
  742.  
  743. In addition, if you set this parameter to Y, and you have 
  744. requested more arrays or set  Quotes per Symbol high enough 
  745. so that product of all the array sizes times the number of arrays 
  746. needed is greater than the amount of  memory available in the 
  747. DOS  640K region, TAS will swap arrays into and out of EMS 
  748. memory. This swapping of arrays can slow TAS processing 
  749. somewht, but it allows you to set Quotes per Symbol to a 
  750. maximum value.
  751. REGISTRATION CODE
  752. When you register TAS , you will receive a REGISTRATION 
  753. CODE based on your Name. Whatever name you include in the 
  754. file REGISTER.DOC will be used to form an encrypted code. 
  755. Use the same name as sent  in the  REGISTER.DOC file. Place 
  756. the REGISTRATION CODE sent to you in the appropriate field.
  757. DEFINE TICKER LIST 
  758. You can create "ticker lists" with TAS. A "ticker list" is a list of 
  759. stock or ticker symbols which you can name as a group. This 
  760. allows you to create individualized lists of symbols against 
  761. which you can run your TAS scripts. As an example, you could 
  762. create a ticker list containing the Dow Jones 30 Industrials, or a 
  763. list containing only stocks you hold. 
  764.  
  765. When you choose the TICKER LIST menu, you are asked if you 
  766. want to create a New Ticker List or Modify an Old Ticker List. 
  767.  
  768. If you request a new Ticker List, you will be prompted for the 
  769. Ticker List name. Enter only the filename portion, not the .TCK 
  770. extension. The file will be created in the \TAS directory.
  771.  
  772. If you want to Modify an Old Ticker List, a File Name Selection 
  773. Screen will appear which contains the names of all the files in 
  774. the current directory ending with ".TCK". Move the cursor or 
  775. mouse over to the correct file name and press Enter (or 
  776. double-click).  Directories will also be displayed in this screen, 
  777. so if your ticker list is in another directory, you can change to 
  778. that directory by moving the cursor to the directory name and 
  779. pressing ENTER.
  780.  
  781. The Ticker List screen will then appear with all the ticker 
  782. symbols contained in the MSP directories you have configured. 
  783. Each symbol that is highlighted in YELLOW has been "selected" 
  784. for inclusion in the ticker list. To select or unselect a symbol, 
  785. move the cursor to the symbol and hit the SPACE Bar. If the 
  786. symbol is selected, it becomes unselected or vice versa.
  787.  
  788. If you want to SELECT ALL TICKERS, hit the F9 (SELECT ALL) 
  789. Key. 
  790.  
  791. To UNSELECT ALL TICKERS, hit the F8 (UnSELECT ALL) 
  792. Key.
  793.  
  794. Once you have created the ticker list, hit the F3 (Save) Key to 
  795. save it. If you do not want to save the list, hit the ESC (Abort) 
  796. Key.
  797.  
  798. If you want to run a TAS script against all of your data, create a 
  799. new Ticker List called "ALL". Hit the F9 Key to select all 
  800. symbols. Then hit the F3 Key to save the list.
  801. If you have set the CONFIGURATION option INCLUDE 
  802. TICKER PERIOD to "Y", your ticker names will be followed 
  803. by a slash and the period of the file, e.g. "AAPL/D" for 
  804. APPLE COMPUTER Daily data. The period is not available 
  805. with ChartPro data files.
  806. BUILD OR RUN SELECTION
  807. Using the BUILD SELECTION screen of TAS, you can create 
  808. your own report containing up to 7 columns of calculated 
  809. formulas or data values. In addition, you can use the Condition 
  810. entry areas (below the Formulas) to specify which conditions 
  811. must be satisfied for a ticker to be included in the report output.  
  812.  
  813. The figure below shows the equivalent of the MetaStock Utility 
  814. "Rank" option where the first formula is the Current Price ("C" 
  815. is the Closing Price), the second formula is the 26 day Rate of 
  816. Change (ROC). The third formula is the 10 day Simple Moving 
  817. Average of the price. The fourth is the 10 day Simple Moving 
  818. Average of "F2", where "F2" is the 26 day ROC. Finally, the last 
  819. formula F5 is the percentage by which the Price is above or 
  820. below the moving average contained in F3.
  821.  
  822.         TAS Selection Creation
  823.     
  824. Enter Formulas Below, e.g. CCI(14)                   Title     
  825. Formula F1  C                     CURR PRC   
  826. Formula F2  ROC(C,26,'%')            %ROC/PRC   
  827. Formula F3  MOV(C,10,'S')            MOV AVG    
  828. Formula F4  MOV(F2,10,'S')            MA %ROC    
  829. Formula F5  (F1/F3-1)*100             %PRC MA    
  830. Formula F6                                                             
  831. Formula F7                                                             
  832.  
  833. Enter Conditions Below, e.g. F1 > F2                 
  834. Condition 1                                                            
  835. Condition 2                                                            
  836. Condition 3                                                            
  837. Condition 4                                                            
  838. Condition 5                                                            
  839. Condition 6   
  840.  
  841. F1]=Help [F3]=Save [F4]=Run [F5]=Options [F7]=Formula Builder ESC]=Quit 
  842.  
  843.                                                          
  844.  
  845.  
  846. You can place any formulas or data value in each of the 
  847. Formula areas. If you hit the F7 key, a list of functions included 
  848. in TAS will be shown on the screen and you will be prompted 
  849. for the parameters of the function.
  850.  
  851. The CONDITION entries are used to "select" only those tickers 
  852. that match the condition. The conditions are specified in terms 
  853. of the formulas given above. In the example above, if you only 
  854. wanted to see tickers whose ROC (Formula 'F2') was greater 
  855. than 50, then you could set 
  856.     CONDITION 1    F2 > 50
  857.  
  858. Also, if you had another condition, for example the current 
  859. price of the ticker is greater than $5, you could place that 
  860. condition as follows
  861.     CONDITION 2    C > 5
  862.  
  863. and that would select only tickers whose ROC is greater than 50 
  864. and whose price is greater than 5.
  865. Selection Build Options
  866. The OPTION Key (F5) allows you to set options for the 
  867. SELECTION, such as the MAXIMUM QUOTES to read, and 
  868. any INDEX file you might want to use. Be sure to use the F3 key 
  869. (SAVE) if you are in the OPTION screen to save your options.
  870.  
  871.             Set Selection Options
  872.                                       
  873.  INDEX Ticker SP-500     Maximum Quotes   200
  874.  
  875.  Start Date     /   /     End Date           /   /                     
  876. Index Ticker
  877. If you want to run a profit test that uses some index, such as the 
  878. SP-500, you can specify the ticker here. Then, in your profit test, 
  879. you refer to the index ticker's value with the INDEX array 
  880. name.
  881. Maximum Quotes
  882. You can specify the maximum number of quotes to load for the 
  883. profit test. This number should be less than or equal to the 
  884. Maximum Quotes per Symbol setting in your Configuration 
  885. Menu.
  886.  
  887. Start Date
  888. If you want to start your test on a specific date, specify that date 
  889. here. Make sure that the date is a date you have in the file. If it 
  890. is not, the test will begin on the first date prior to that date.
  891. End Date
  892. If you want to end your test on a specific date, specify that date 
  893. here. Make sure that the date is one you have in the file. If it is 
  894. not, the test will end on the first date prior to the end date.
  895. Running Your Selection
  896. Once your SELECTION is built, you can run it using the F4 Key. 
  897. You will be asked for a TICKER LIST against which to run the 
  898. SELECTION. Choose one. 
  899.  
  900. Once the SELECTION starts running, there is no output to the 
  901. main part of the screen until the SELECTION completes. At that 
  902. point, a "report" will display on your screen with the TICKER in 
  903. the first column and the formula values you set up for F1 
  904. through F7 in each column.
  905. Sorting on Selected Columns
  906. You can SORT your report by the contents of any column by 
  907. typing the ALT key at the same time as you hold down the 
  908. number over the column you want to sort on. 
  909.  
  910. For example, to sort on the contents of the column next to 
  911. TICKER (this would be column numbered "1"), you would type 
  912. ALT-1 key pair. If you want to change the order of the sorting 
  913. from ascending order to descending order, type ALT-D (for 
  914. "Descending"). To go back to ascending order, type ALT-A. 
  915. Once you have set the sorting direction, you can then resort 
  916. using a ALT-column_number again.
  917.  
  918. Printing Your Selection Report
  919. To PRINT the contents of your report in the current sort order, 
  920. type ALT-P. If you want to print to a file, enter a file name. To 
  921. print to your PRINTER, type LPT1 (or whatever address your 
  922. printer is hooked up to) in the file name prompt.
  923.  
  924. Errors In Selection Formulas 
  925. If you have any errors in the SELECTION you have created, you 
  926. will be told about them when you try to run the SELECTION. 
  927. An error message  will be displayed and then the TAS EDITOR 
  928. will be run with a file called _RUNSEL.TAS. This file is the file 
  929. that is created from your SELECTION. It is a special form of a 
  930. TAS script. You should recognize the formulas though, since 
  931. they are the ones you entered in your SELECTION. 
  932.  
  933. The EDIT screen will redisplay the error message at the bottom 
  934. of the screen. Hit the SPACE bar and the cursor will be placed 
  935. near the place where the error was found. Look at the formula 
  936. and try to figure out what is the problem. 
  937.  
  938. Once you have determined the  problem, you can make a 
  939. change in the editor and type F4 to SYNTAX CHECK the file 
  940. again. If you fixed the problem, there should be no errors now. 
  941.  
  942. You are only half done though. Now you have to go back to 
  943. your BUILD SELECTION screen (by typing ESC) and fix the 
  944. formula(s) in that screen as well. Be sure to save (by hitting F3) 
  945. your file when it works.
  946. BUILD OR RUN PROFIT TEST
  947. The BUILD OR RUN PROFIT TEST screen is similar to the 
  948. BUILD SELECTION screen in appearance. Shown below is a 
  949. sample of the Build Profit Test screen. 
  950.  
  951.     TAS Build/Run Profit Test
  952. Enter Plot Formulas Below, e.g. CCI(14)                    
  953. Formula F1      RSI(14)                                                    
  954. Formula F2                                                             
  955. Formula F3                                                             
  956. Formula F4                                                             
  957. Formula F5                                                             
  958. Formula F6                                                             
  959. Formula F7                                                             
  960. Enter Buy/Sell Conditions below  e.g. F1 > F2              
  961. Cond    C1      F1[-1] < 30 AND F1 > 30                                    
  962. Cond    C2      F1[-1] > 70 AND F1 < 70                                    
  963. Cond    C3                                                             
  964. Cond    C4                                                             
  965. Cond    C5                                                             
  966. Cond    C6                                                             
  967. BUY WHEN          SELL WHEN         LONG STOP        SHORT STOP       
  968. C1                    C2                                                   
  969.  
  970. [F1]=Help [F3]=Save [F4]=Run [F5]=Options [F7]=Formula Builder ESC=Quit
  971.  
  972. You can fill in the FORMULAs (F1 to F6) with indicators (or 
  973. combinations of indicators) you want to 'plot' for the profit test. 
  974. Then, in the CONDITION entry areas (COND C1 to C6), you fill 
  975. in conditions you would use in a BUY, SELL or STOP loss 
  976. signal. 
  977.  
  978. Once you have entered your FORMULAS and the CONDitions, 
  979. you can choose which conditions you want to use for the BUY, 
  980. SELL and STOP signals. 
  981.  
  982. In the example above, only RSI(14) is being plotted. The 
  983. condition C1 tests to see if the RSI has crossed from below 30 to 
  984. above 30 (Buy Signal). Condition C2 tests if the RSI has crossed 
  985. from above 70 to below 70 (Sell Signal). Notice how C1 is 
  986. entered below BUY WHEN, indicating the Profit Tester should 
  987. buy if condition C1 is true (and the stock is not already held). 
  988. And, then C2 is below SELL WHEN, indicating a similar SELL 
  989. strategy.
  990.  
  991. Profit Test has a number of options which are set by hitting the 
  992. F5 Function Key in this screen. You will see the following 
  993. screen. Each of the items in bold represent one of several 
  994. choices available for the option.
  995.  
  996.  
  997.     Set TAS Profit Test Options
  998.  
  999.  
  1000.  Initial Cash 5000   Test Type LONG    Commissions  NOCOMM
  1001.  
  1002.  Share Purchases ONESHARE             Price Slippage 0 - TODAYS CLOSE
  1003.  
  1004.  Output File Name                     Report Detail DETAIL
  1005.  
  1006.  Maximum Quotes                       INDEX Ticker
  1007.  
  1008.  Reinvest Profits N
  1009.  
  1010.  Start Date     /    /     End Date           /    /
  1011.  
  1012. When you bring up this screen, you can choose options by using 
  1013. the TAB key to move to each field and selecting the appropriate 
  1014. option. Type the HELP Key (F1) at each field to see the meaning 
  1015. of the choices. When you are done with changes to this screen, 
  1016. hit the F3 key to save the options. If you are in a "pop-up" 
  1017. window, hit ENTER, then hit F3.
  1018.  
  1019. Profit Test Option Settings
  1020. Initial Cash
  1021. This is the amount of "money" the trading should start with. It 
  1022. must be sufficient to buy the amount of shares specified by the 
  1023. Share Purchase option below. For example, if you start with 
  1024. $1,000 and you are buying Round Lots (100 shares), your stock 
  1025. had better not sell for more than $10 per share or you won't 
  1026. have enough money to buy a round lot.
  1027. Test Type
  1028. There are 3 choices for this option. You can perform a LONG ,  
  1029. SHORT or BOTH test. 
  1030. A LONG test only takes long positions, that is, it only buys to 
  1031. open a position and sells to close it.
  1032.  
  1033. A SHORT test only takes short positions, selling to open and 
  1034. buying to close ("cover") the position.
  1035.  
  1036. A BOTH test opens a long or short position and reverses each 
  1037. time a signal is generated to "go the other way". This is 
  1038. essentially a "stop and reverse" system.
  1039. Commissions
  1040. You can use several commission structures for your simulated 
  1041. trading. The commissions for Charles Schwab,  OLDE Discount, 
  1042. and PCFN brokerages are built into the profit tester. These 
  1043. commissions are accurate as of 1/1/91. You can also specify a 
  1044. percentage commission amount or a fixed dollar amount for 
  1045. each trade. Finally, you can ignore commissions altogether.
  1046. Share Purchases
  1047. You can elect to purchase shares of the security in either Round 
  1048. Lots or using all available cash. If you choose round lots, your 
  1049. profit test will purchase or sell stocks in groups of 100. This is 
  1050. important if you are using a real commission schedule, since the 
  1051. commission per share is reduced when you trade in round lots. 
  1052.  
  1053. Price Slippage
  1054. Price Slippage refers to the price at which you want to exercise 
  1055. the trade. Generally, you cannot execute a trade at the exact 
  1056. price you want, nor can you always trade at the previous day's 
  1057. closing price. So, you have several options for choosing the 
  1058. trade price.
  1059. Price Slippage Type
  1060. Meaning
  1061.  
  1062.  0 - TODAYS CLOSE
  1063. Today's closing price
  1064.  
  1065.  1 - NEXT AVERAGE
  1066. Tomorrow's 
  1067. (High+Low+Close)/3
  1068.  
  1069.  2 - NEXT OPEN
  1070. Tomorrow's Open 
  1071. Price
  1072.  
  1073.  3 - NEXT CLOSE
  1074. Tomorrow's Close 
  1075. Price
  1076.  
  1077.  4 - NEXT HIGH
  1078. Tomorrow's High Price
  1079.  
  1080.  5 - NEXT LOW
  1081. Tomorrow's Low Price
  1082.  
  1083.  
  1084. Output File Name
  1085. If you want the output report from the profit test to go to a file, 
  1086. specify the name here. 
  1087. Report Detail
  1088. There are three choices for this option: DETAIL, 
  1089. TICKERSUMMARY, and TOTALSUMMARY.
  1090.  
  1091.  DETAIL
  1092. Show every trade
  1093.  
  1094.  TICKERSUMMARY
  1095. Show totals for each ticker
  1096.  
  1097.  TOTALSUMMARY
  1098. Show totals only for all 
  1099. tickers
  1100.  
  1101.  
  1102. Maximum Quotes
  1103. You can specify the maximum number of quotes to load for the 
  1104. profit test. This number should be less than or equal to the 
  1105. Maximum Quotes per Symbol setting in your Configuration 
  1106. Menu.
  1107. Index Ticker
  1108. If you want to run a profit test that uses some index, such as the 
  1109. SP-500, you can specify the ticker here. Then, in your profit test, 
  1110. you refer to the index ticker's value with the INDEX array 
  1111. name.
  1112. Reinvest Profits
  1113. This option determines how much money you want the profit 
  1114. tester to use for each trade. 
  1115. If you specify "Y", the profit test will use your current cash 
  1116. position, including profits, minus losses and commissions to 
  1117. determine how much money you have available to trade.
  1118. If you specify "N", the profit tester will initiate each trade with 
  1119. the same amount of cash, regardless of your prior profits, losses 
  1120. or commissions. 
  1121. Start Date
  1122. If you want to start your test on a specific date, specify that date 
  1123. here. Make sure that the date is a date you have in the file. If it 
  1124. is not, the test will begin on the first date prior to that date.
  1125. End Date
  1126. If you want to end your test on a specific date, specify that date 
  1127. here. Make sure that the date is a date you have in the file. If it 
  1128. is not, the test will begin on the first date prior to that date.
  1129. Running the Profit Test
  1130. To run the Profit Test hit the F4 key (once you leave the Options 
  1131. screen). If you want to save the Profit Test formulas, save it 
  1132. with the F3 key and then reselect it to run it.
  1133.  
  1134. The file that is built when you create (or modify) a Profit Test 
  1135. has a special file extension ".PTS" (Profit Test Script). This file 
  1136. has a special format that can be read by the Build/Run Profit 
  1137. Test menu. If you go in with an editor and change any part of 
  1138. the .PTS file, it is very likely that the .PTS file WILL NO 
  1139. LONGER WORK when you pull it up into the Profit Test 
  1140. screen. If you want to change a .PTS file, copy it to a file .TAS 
  1141. file name and edit that file. Once you do that, you have to run 
  1142. the file as a TAS SCRIPT, not a Profit Test. 
  1143.  
  1144. EDIT TAS SCRIPT - Editing TAS Scripts
  1145. TAS has a built-in text editor which can be used to create and 
  1146. modify TAS script files. All TAS script files end with the suffix 
  1147. ".TAS". 
  1148.  
  1149. When you select this menu item, you will be asked if you want 
  1150. to create a New Script or Modify an Old Script. 
  1151.  
  1152. If you request a new script, you will be prompted for the script 
  1153. name. Enter only the filename portion, not the .TAS extension. 
  1154. The file will be created in the \TAS directory.
  1155.  
  1156. If you want to modify an old script, a File Name Selection 
  1157. Screen will appear which contains the names of all the files in 
  1158. the current directory ending with ".TAS". Move the cursor or 
  1159. mouse over to the correct file name and press Enter (or 
  1160. double-click). 
  1161.  
  1162. The editor screen will then appear with the contents of the file 
  1163. displayed. 
  1164. The TAS editor cannot handle lines larger than 76 characters . 
  1165. If the line is longer than that, it will be broken at column 76 
  1166. and continued onto the next line. If the total length of the line 
  1167. is more than 256 characters, the last part of the line will be lost 
  1168. if the file is saved. You should be aware of this when creating 
  1169. a script in another editor and then using the TAS editor to 
  1170. modify it. An arbitrary "break" at column 76 might cause a 
  1171. word to be split in the middle, thus introducing an error into 
  1172. the script.
  1173.  
  1174. Editor Function Keys
  1175. F1    HELP Key 
  1176.     If you need help with the editor, hit the F1 
  1177. (Help) Key. You will see a list of editor 
  1178. commands. 
  1179.  
  1180. F3    Save Script File Key 
  1181.     When you are done with your editing, you can 
  1182. save the file by hitting the F3 (Save) Key. If you 
  1183. do not want to save the file, hit the ESC (Abort) 
  1184. Key.
  1185.  
  1186. F4    Run Script Key
  1187.     The Run Script key will run the script you are 
  1188. currently editing without saving it back to its 
  1189. original script file.     
  1190.     
  1191. F5    Check Script Key 
  1192.     If you wish to check your script file for errors in 
  1193. syntax, press the F5 key. If there are errors in 
  1194. the script which can be detected by the Check 
  1195. Script function, an error message showing the 
  1196. type of error encountered and the line and 
  1197. column number on which the error occurred 
  1198. will appear in a window at the bottom of the 
  1199. screen. This window will disappear after a few 
  1200. seconds or when you hit a key. Then the script 
  1201. file will be positioned so that the cursor is on 
  1202. the line where the error was detected. It is 
  1203. usually the case that the error is somewhere 
  1204. either on that line or on the previous line. 
  1205.  
  1206. F7     Formula Builder Key 
  1207.     One key available in the editor is the Formula 
  1208. Builder Key. This key will bring up a list of 
  1209. Technical Indicator functions and Pre-defined 
  1210. Data Arrays. If you select one of the functions 
  1211. or arrays, the subsequent parameters of the 
  1212. function (e.g. MOV "Moving Average" requires 
  1213. 3 additional parameters) will be prompted. 
  1214. Enter each parameter. When you are done, the 
  1215. formula and parameters will be placed into 
  1216. your script file at the location of the cursor 
  1217. when you hit F7.
  1218.  
  1219. RUN TAS SCRIPT - Running TAS Scripts
  1220. If you have created a script (or are using one of the example 
  1221. scripts) and you want to run it against a specific Ticker List, you 
  1222. should choose the "RUN TAS Scripts" option from the Main 
  1223. Menu. (You must have created at least one Ticker List before 
  1224. you can run TAS)
  1225.  
  1226. When this option is chosen, you will be asked for the TAS script 
  1227. name and the Ticker List name. Each choice will be from a list of 
  1228. filenames ending with the appropriate extension (".TAS" or 
  1229. ".TCK"). Move the cursor to the correct file name for each choice 
  1230. and hit ENTER. 
  1231. QUIT
  1232. This option will exit from TAS. If you want to go to DOS and 
  1233. return to what you were doing within TAS, use the ALT-X key.
  1234.  
  1235.  
  1236. TAS Selection Scripts -  Description
  1237. TAS Selection reads each ticker in the TICKER LIST from the 
  1238. MSP or Chartpro data file. It reads the quotes for the file into 
  1239. the pre-defined data arrays up to the lower of either (1) the 
  1240. number specified in the QUOTES PER SYMBOL (in the 
  1241. Configure TAS Menu) (2) the number specified in 
  1242. #MAX_QUOTES in the script file itself,  (3) all the quotes in the 
  1243. file, or (4), the number of quotes between the SCAN_DATE or 
  1244. Start Date and End Date.
  1245.  
  1246. Once all the price history has been read into the data arrays, 
  1247. TAS "executes" the statements in the TAS script file. Once all 
  1248. statements in the file have been executed, TAS moves on to the 
  1249. next ticker symbol in the TICKER LIST. 
  1250.  
  1251. This process continues until all the symbols in the TICKER LIST 
  1252. have been read or until an error is encountered in the script file.
  1253.  
  1254.  
  1255.  
  1256. TAS Script Language
  1257. TAS Script Language  is loosely based on  the programming 
  1258. language  PASCAL. There has to be some way to tell TAS what 
  1259. you want to look for, compute, print, etc., so the choices made 
  1260. in the way you  tell it to do something are what can be called 
  1261. the "syntax". In a way, the language is similar to English, where 
  1262. you would say "If a is greater than b then tell me about it". 
  1263. Except, as you will see, TAS has abbreviations for relationships 
  1264. like "is greater than". Other than that, however, the language 
  1265. can be read like English and algebraic notation combined. The 
  1266. following topics will give an explanation of the TAS script 
  1267. language.
  1268.  
  1269. The TAS package contains numerous examples of TAS Scripts. 
  1270. You should print them and look at them while reading the next 
  1271. section. The sample scripts contain "comments" which explain 
  1272. what the script is doing at each point of the script.
  1273. Syntax
  1274. In the subsequent discussion, the word "statement" is used. A 
  1275. "statement" is like a sentence in English. Like a sentence, it is 
  1276. composed of "words". 
  1277.  
  1278. A semi-colon (;) is used to tell TAS that the statement you just 
  1279. entered is done. Every statement should be terminated by a 
  1280. semi-colon.
  1281.  
  1282. In the syntax descriptions below, words you must use are in 
  1283. UPPER CASE, and parts of the statement that are up to you are 
  1284. in lower case.
  1285. Building Blocks
  1286. The "Building Blocks" of TAS scripts are the following types of 
  1287. items:
  1288.  
  1289. "VARIABLES".
  1290.     Variables are where you put values or, in the 
  1291. case of "pre-defined" variables, where you get 
  1292. them. The names are anything you choose, but 
  1293. they have to start with a letter of the alphabet.
  1294.  
  1295. "ASSIGNMENT ". 
  1296.     The ASSIGNMENT statement (":=" or "=") is 
  1297. how you can move a value from one place to 
  1298. another.
  1299.  
  1300. "ARITHMETIC Operators".
  1301.     These are the usual ADD(+), SUBTRACT (-), 
  1302. MULTIPLY(*) and DIVIDE(/).
  1303.  
  1304. "FUNCTIONS".
  1305.      A "function" is a built-in Technical Indicator , 
  1306. math function, or "output" function which 
  1307. usually returns a value.
  1308.  
  1309. IF statements 
  1310.     An "IF" statement is used to test a condition or 
  1311. value. Once the condition is tested, you can 
  1312. perform certain actions "if" it is TRUE or "if" it 
  1313. is false.
  1314.  
  1315. "BEGIN-END Blocks"
  1316.     A "BEGIN-END" block is a way to "group" 
  1317. several statements into one. For example, the IF 
  1318. statement only allows you to execute the 
  1319. following "statement". However, if you use a 
  1320. BEGIN followed by multiple statements, 
  1321. followed by an END, the whole series of 
  1322. statements from the BEGIN through the END is 
  1323. considered to be ONE statement. It is similar to 
  1324. putting parentheses around an arithmetic 
  1325. expression.
  1326.  
  1327. "Logical AND" 
  1328.     The AND word takes a left-hand side and a 
  1329. right-hand side. If both are TRUE, the whole is 
  1330. TRUE.  
  1331.  
  1332. "Logical OR"     
  1333.     The OR word also has a left and right side. If 
  1334. either is TRUE, the whole is TRUE.
  1335.  
  1336. "RELATIONAL Operators" 
  1337.     These are how you test the "relation" between 
  1338. two values. The Englishlanguage form of the 
  1339. operators and the symbolic form for the 
  1340. operators are shown in the table below. You 
  1341. may use either form for expressing an equality 
  1342. or inequality relationship.
  1343.     
  1344. English Language Keyword 
  1345. form 
  1346. Symbolic form
  1347.  
  1348. EQUAL 
  1349. =
  1350.  
  1351. GREATER THAN
  1352. >
  1353.  
  1354. GREATER THAN OR EQUAL
  1355. >=
  1356.  
  1357. LESS THAN
  1358. <
  1359.  
  1360. LESS THAN OR EQUAL
  1361. <=
  1362.  
  1363. NOT EQUAL
  1364. <>
  1365.  
  1366.  
  1367. Comments
  1368.     These are used to "document" the TAS script. 
  1369. They perform no function, but only help to 
  1370. understand what is going on in the general area 
  1371. of the script. They are good to use and should 
  1372. be included in the script to make it easier to 
  1373. understand.
  1374. Variables
  1375. The concept of a "variable" can be difficult to communicate to 
  1376. anyone who hasn't programmed before. Loosely speaking, it is a 
  1377. name given to a "place" to put a "value". Think of it as a "name 
  1378. for a value". 
  1379.  
  1380. Except for "pre-defined" variables (see below) you can make up 
  1381. the names for the variables in your script. 
  1382.  
  1383. A variable name must start with an alphabetic letter, contain 
  1384. only letters, numbers and underscores ("_"). Some valid names 
  1385. are: 
  1386.  
  1387. my_stuff, my_122999, my999, m9, M32_togo, Beethoven, etc
  1388.  
  1389. Generally, you first use variables in "assignment statements", 
  1390. that is, you first "put" something into them. Subsequently, you 
  1391. can use them as values passed to functions or in an IF 
  1392. statement.
  1393.  
  1394. TAS Variable Types 
  1395. "String" Variables 
  1396. These are variables to hold text information, like 'IBM', or 'THIS 
  1397. IS A STICK-UP'.  String variables must be surrounded by single-
  1398. quote (') characters. 
  1399. "Numeric" Variables    
  1400. These are variables that hold numbers, like 32, or -75.69, or 
  1401. 10000034.
  1402.  
  1403. There are two types of numeric variables, INTEGERS and REAL 
  1404. numbers. An INTEGER is a number which has no decimal point 
  1405. and must be smaller than 32,767 in value. 
  1406.  
  1407. An INTEGER can be NO LARGER THAN 32,767 in value. If 
  1408. you need to use a number larger than 32,767 then you must 
  1409. include a decimal point followed by at least one zero in the 
  1410. number. For example, if you want to use the number 1 million 
  1411. in your script, you cannot say 10000000 because the number is 
  1412. larger than 32,767 and it does not contain a decimal point. In 
  1413. this case, you must say 1000000.0 to tell TAS that the number 
  1414. is a REAL number.
  1415. "Numeric Array" Variables
  1416. These are variables that hold many numbers in an "array"  (or 
  1417. collection of numbers). All of the numbers in the array have the 
  1418. same variable name; however, you cannot "look" at them all at 
  1419. once.  You must pick out one of the numbers of the array by 
  1420. specifying its "location" in the array. 
  1421.  
  1422. An example of an array that is always available when a ticker is 
  1423. processed is the Closing Price array,"C". Obviously, there are 
  1424. many Closing Prices (one for each quote, in fact), and in order 
  1425. to refer to the Closing Price on a particular day, there must be 
  1426. some way to reference it. In the absence of any explicit reference 
  1427. to a particular day in an array, TAS will assume the reference is 
  1428. for the last day for the ticker.
  1429.  
  1430. However, if you need to know what the value of the Closing 
  1431. Price was two days before the last quote's day, you have to tell 
  1432. TAS that you want the quote two days before. You can do this 
  1433. in one of three ways. Suppose you have 100 days of data 
  1434. loaded. To get the Closing Price quote from two days  prior to 
  1435. the last day, you could say:
  1436.  
  1437. 1)    C[-2]       
  1438. 2)    C[98]    
  1439. 3)     C 2 DAYS AGO    
  1440. Methods (1) and (2) above use "subscript" notation to tell TAS 
  1441. which number in the array is needed. In the first case, you are 
  1442. saying "give me the Closing Price array entry 2 days backward 
  1443. from the last entry". The negative number says to start 
  1444. "counting" back days from the last day. 
  1445.  
  1446. The second version, shown in (2), says "give me the Closing 
  1447. Price array entry 98 days from the first day loaded". Since we 
  1448. had stipulated 100 days were loaded, this is the same as the 
  1449. price two days ago (100-98 = 2).
  1450.  
  1451. Finally, the last expression, shown in (3), says in English that 
  1452. you want to retrieve the Closing Price 2 days ago. In the interest 
  1453. of readability, this version is the best, but it is more wordy and 
  1454. does incur a very slight performance penalty when you run the 
  1455. script, since TAS has extra work to do in order to interpret the 
  1456. English phrase.
  1457.  
  1458. In addition, you can also describe the current day's Closing 
  1459. value by saying 
  1460.     CLOSE OF TODAY
  1461. and you can refer to yesterday's Closing price by saying
  1462.     CLOSE OF YESTERDAY
  1463.  
  1464. Other pre-defined data arrays, like H, L, C, V (for High Price, 
  1465. Low Price, Closing Price and Volume) are examples of arrays. 
  1466.  
  1467. If you want to refer to a closing price 10 days ago (using our 
  1468. earlier example of 100 days loaded), you can say 
  1469. C[-10] or C[90] or CLOSE 10 DAYS AGO
  1470. Each time you refer to an "element" of an array, you need to 
  1471. either provide the "subscript" in square brackets, e.g. [-10], 
  1472. which means "subscript minus ten" or say "xx DAYS AGO".
  1473.  
  1474. You can define your own variable array by "declaring" it (prior 
  1475. to first using it) as follows:
  1476.  
  1477. variable_name : ARRAY;
  1478.     OR
  1479. variable_name IS AN ARRAY;
  1480.  
  1481. where 'variable_name' is the name by which you want to refer 
  1482. to the array.
  1483.  
  1484. You might wonder "Why would I define my own array?". The 
  1485. answer to that depends on what you are trying to do. Generally, 
  1486. you define your own array because you want to put some 
  1487. indicator value into it. Most indicators create arrays of numbers. 
  1488. When using a charting program, you can see these numbers as a 
  1489. line on a graph. Each of the points on the line are values of the 
  1490. indicator for a particular day. Now, suppose you wanted to 
  1491. know what the value of the indicator was two days ago. 
  1492.  
  1493. Normally, when an indicator is computed, it returns (or creates) 
  1494. an array. However, if you don't put the result of the indicator 
  1495. function into an array (declared via the ARRAY dcclaration as 
  1496. shown above), then the result stored is the indicator value for 
  1497. the current day only.  In order to "look" at the indicator value 
  1498. for other than the last day loaded, you must place it into an 
  1499. array that you have already declared. For more information on 
  1500. placing the results of a function into an array or variable, see the 
  1501. section that follows.
  1502. Assignment Statement
  1503. The Assignment Statement is used to set the contents of a 
  1504. variable or array to the result of an "expression". An 
  1505. "expression" is another of those computereze terms, but it means 
  1506. sequence of mathematical operations and/or the result of a 
  1507. "function". 
  1508.  
  1509. It might help to give some examples of assignment operations:
  1510.  
  1511. a := b + 3 / 4;
  1512.  
  1513. The ":=" (colon-equal) is the operator that says "assign to" . So, 
  1514. reading the above assignment, in English, it says "add the 
  1515. contents of variable 'b' to the result of dividing 3 by 4. Place this 
  1516. result in variable 'a'". If variable 'b' contained 6 when this 
  1517. statement was encountered, then variable 'a' would contain 6.75 
  1518. (6 + 3/4).
  1519.  
  1520. Another example is:
  1521.  
  1522. a := (c[-1] + c[0]) / 2;
  1523.  
  1524. In this example, the array 'c' is pre-defined as the "closing price 
  1525. array". So, the statement is adding the closing price yesterday 
  1526. (c[-1]) to the closing price today (c[0]). It is then dividing the 
  1527. total of this addition by 2 and placing the result in variable 'a'. 
  1528. Note the use of the parentheses to "group" the addition so that it 
  1529. would be done before the division by 2. If there were no 
  1530. parentheses, the result would have been considerably different. 
  1531. Instead, it would have divided today's closing price by 2, added 
  1532. it to yesterday's closing price, and placed the result in 'a'.
  1533.  
  1534. Another example of an assignment is the result of a "function" 
  1535. call. All Technical Indicators available in TAS are created by 
  1536. making a "function" call. In other words, the Technical Indicator 
  1537. is referred to by its name (the "function"). So, for example,
  1538.  
  1539. a := mov(c,21,'E');
  1540.  
  1541. calculates the 21 day exponential moving average ("mov" 
  1542. function) of the closing price array. If variable 'a' has been 
  1543. declared to be an ARRAY prior to this point, then 'a' contains all 
  1544. the moving average "points". If 'a' has not been declared as an 
  1545. ARRAY, then 'a' will contain the value of the moving average at 
  1546. the last point of the range, i.e., today's value. See the section 
  1547. titled "Numeric Array" Variables  for a description of arrays and 
  1548. "subscripts".
  1549. Arithmetic Operators
  1550. Arithmetic Operators are addition (plus sign '+'), subtraction 
  1551. (minus sign '-'), multiplication (asterisk '*') , division (slash '/') 
  1552. and "exponentiation" (caret "^"). When you write an arithmetic 
  1553. expression, you should use parentheses to guarantee the order 
  1554. in which the operations are performed. In general, 
  1555. exponentiation is performed first, then division and 
  1556. multiplication are performed first, then addition and 
  1557. subtraction. 
  1558. Functions 
  1559. A "function" is a reference to a "built-in" Technical Indicator 
  1560. function (like "MOV(...)"), an output function (like WRITE or 
  1561. WRITELN), or an array manipulation function (like DIVBY). See 
  1562. the individual descriptions of each function in the Metastock 
  1563. Professional  User's Guide for a more complete definition of the 
  1564. meaning of the various Technical Indicators that are found in 
  1565. that program.
  1566. IF Statements
  1567. The IF statement is the most powerful scanning feature of TAS. 
  1568. It enables you to create complex relationships between 
  1569. indicators based on their relationship with other indicators and 
  1570. values.
  1571.  
  1572. An IF statement is written as follows:
  1573.  
  1574. IF expression THEN
  1575.     statement to execute if the 'expression' is true
  1576. ELSE
  1577.     statement to execute if the 'expression' is false;
  1578.  
  1579. The ELSE part of the IF statement is optional, but sometimes it 
  1580. is convenient to make a two way decision about something. You 
  1581. could alternatively say:
  1582.  
  1583. IF expression THEN
  1584.     statement to execute if the 'expression' is true;
  1585.  
  1586. The TAS language does not require you to include the word 
  1587. THEN after the IF part of the statement. You must terminate 
  1588. each IF statement with a semi-colon. Note, however, that IF 
  1589. statements containing an ELSE part are terminated after the 
  1590. ELSE part. For example,
  1591.  
  1592. IF a GREATER THAN b THEN
  1593.     WRITELN('a is greater than b, hurray!')
  1594. ELSE
  1595.     WRITELN('a is not greater than b, sorry.');
  1596.  
  1597. Note how there is a semi-colon on the last line, but not after the 
  1598. first WRITELN. However, if you wanted to print a message 
  1599. only if "a" is greater than "b", then you would say
  1600.  
  1601. IF a GREATER THAN b THEN
  1602.     WRITELN('a is greater than b, hurray!');
  1603.  
  1604. Note the semi-colon after the last line.
  1605. BEGIN..END Statement
  1606. Suppose you want to do more than one thing if the condition "a 
  1607. is greater than b" is true. In that case, you would need to use a 
  1608. BEGIN .. END block.
  1609.  
  1610.  A "BEGIN..END" block "groups" all statements between the 
  1611. BEGIN and the END so that the entire "group" is treated as if it 
  1612. were one statement. 
  1613.  
  1614. This is useful in the case of the IF statement, because the action 
  1615. to be taken following the THEN or ELSE part of the IF can only 
  1616. be one statement. But if you use the BEGIN..END block to 
  1617. group several statements, the entire block is treated as a "single" 
  1618. statement. Think of BEGIN..END blocks in the same way you 
  1619. would think of parenthesized arithmetic expressions. You use 
  1620. parentheses to "group" some operations so that they are treated 
  1621. as a group.
  1622.  
  1623. An example of the use of the BEGIN..END block in an IF 
  1624. statement is shown below:
  1625.  
  1626. IF a GREATER THAN b THEN 
  1627. BEGIN
  1628.     a := a - 1;
  1629.     b := mov(c,21,'E');
  1630.     WRITELN('New values for a and b are:' ,a,' ',b);
  1631. END;
  1632.  
  1633. All three statements following the BEGIN will be executed 
  1634. (acted upon) if the value of "a" is greater than the value of "b". If 
  1635. you had left out the BEGIN..END section, only the first 
  1636. statement ("a := a - 1") would have been done if "a GREATER 
  1637. THAN b" was true. The following two statements would have 
  1638. ALWAYS been done, since they were not part of the IF.
  1639. GOTO Statement and LABELS
  1640. You can use the GOTO statement in a script to transfer control 
  1641. to a LABEL you define in the script. 
  1642.  
  1643. A LABEL is defined by a COLON (":")  immediately followed 
  1644. by a LABEL NAME. For example, in the script below, the third 
  1645. line has the sequence ":AGAIN". This makes "AGAIN" the name 
  1646. of a LABEL. On the tenth line of the script, there is a "GOTO 
  1647. AGAIN" which transfers the "flow of control" of the script back 
  1648. to the statement just following the label 'AGAIN'. The purpose 
  1649. of the script below is to show an example of GOTO and 
  1650. LABEL's, but incidentally, it also computes all the moving 
  1651. averages for periods from 20 days to 40 days and prints them.
  1652.  
  1653. ma_array10 IS AN array;
  1654. n = 20;
  1655. :AGAIN
  1656. ma_array10 = mov(c,n,'e');
  1657. writeln(ticker,date,int(n),' day moving average is ',ma_array10);
  1658. n = n+1;
  1659. if n LESS THAN 40 then
  1660.     GOTO AGAIN;
  1661.  
  1662. The following script is an example of using GOTO and LABEL's 
  1663. to transfer control FORWARD in the script. Note the GOTO B 
  1664. in the first IF statement.
  1665.  
  1666. n = 1;
  1667. :a 
  1668. if n GREATER THAN 30 then goto b;
  1669. { DO SOME WORK HERE USING THE VALUE OF N}
  1670. n = n+1;
  1671. goto a;
  1672. :b
  1673. writeln('done...n is ',n);
  1674.  
  1675. When you use the GOTO within a BEGIN..END block, you 
  1676. must be careful not to GOTO someplace outside of the block. 
  1677. Your script must encounter the END statement which matches 
  1678. the previous BEGIN statement. 
  1679. GOSUB statement
  1680. The GOSUB statement is used to "go to a subroutine". This 
  1681. statement can be used when you have the same section of script 
  1682. code that you want to execute several times. Rather than 
  1683. including the same lines in the script in each place you want to 
  1684. use them, you can place them in one location in the script and 
  1685. use GOSUB each place you want to execute them.
  1686.  
  1687. When you use GOSUB, you specify a label where the 
  1688. 'subroutine' starts. When the subroutine is completed, it should 
  1689. have a RETURN statement. The RETURN statement will return 
  1690. the script control back to the statement FOLLOWING the 
  1691. GOSUB.
  1692.  
  1693. Here is a sample script using the GOSUB statement:
  1694.  
  1695. a = 5;
  1696. gosub s1;
  1697. gosub s2;
  1698. gosub s4;
  1699. return;
  1700. :s1 
  1701. begin
  1702. writeln(ticker);
  1703. writeln('s1 entered, a = ',int(a));
  1704. return;
  1705. end;
  1706. :s2 
  1707. a = a+1;
  1708. begin
  1709. writeln('s2 entered, a = ',int(a));
  1710. gosub s3;
  1711. return;
  1712. end;
  1713. :s3 
  1714. a = a+1;
  1715. begin
  1716. writeln('s3 entered, a = ',int(a));
  1717. return;
  1718. end;
  1719. :s4 
  1720. a = a+1;
  1721. begin
  1722. writeln('s4 entered, a = ',int(a));
  1723. return;
  1724. end;
  1725.  
  1726. The output from this script is:
  1727.  
  1728. AMH     
  1729. s1 entered, a =     5
  1730. s2 entered, a =     6
  1731. s3 entered, a =     7
  1732. s4 entered, a =     8
  1733. RETURN statement
  1734. The RETURN statement in a script will stop processing the 
  1735. current ticker or return from a GOSUB call. For example, if you 
  1736. want to avoid computing several complex indicators if there are 
  1737. less than 100 quotes in the file or the price is less than $5, you 
  1738. could put the following section of code BEFORE your 
  1739. calculations in the script:
  1740.  
  1741. IF quote_count LESS THAN 100 OR c LESS THAN 5 THEN 
  1742.     RETURN;
  1743.  
  1744. Or, if you have a subroutine that you call with the GOSUB 
  1745. statement, you need to return back to the place where the 
  1746. GOSUB was made by using a RETURN statement at the end of 
  1747. the subroutine.
  1748.  
  1749. GOSUB SUB1;        {Call subroutine 1}
  1750. RETURN;            {Return to TAS and end script}
  1751. :SUB1           { BEGINNING OF SUB1}
  1752. { DO WHATEVER SUB1 DOES HERE
  1753.         ......................}
  1754. RETURN;            { RETURN FROM SUB1}
  1755. Logical Operators
  1756. You can combine relations by using the words "AND" and 
  1757. "OR". They have the same sense as in English. Whenever you 
  1758. use AND and OR, you can use parentheses to group your 
  1759. relations to be sure they are computed the way you want them 
  1760. to be understood. For example:
  1761.  
  1762. IF a GREATER THAN b AND b EQUAL TO 1 THEN
  1763.     WRITELN('a is greater than b and b is equal to 1');
  1764.  
  1765. This example compares "a" to "b". If "a" is greater than "b", then 
  1766. it compares "b" to the number 1. If "b" is equal to 1, then the 
  1767. message 
  1768.     a is greater than b and b is equal to 1
  1769. will be printed. If either of the "relations" (a in "relation" to b 
  1770. AND b in "relation" to 1) is not true, then the WRITELN will not 
  1771. be done.
  1772.  
  1773. On the other hand, suppose we want to print the message if 
  1774. either of the conditions is true. Then we would say:
  1775.  
  1776. IF a > b OR b = 1 THEN
  1777.     WRITELN('a is greater than b OR b is equal to 1');
  1778.  
  1779. In this case, it would print the message if "a" were greater than 
  1780. "b" or if "b" were equal to 1. 
  1781. Relational Operators
  1782. Relational Operators describe a "relationship" between the 
  1783. expression on the left of the operator and the expression on the 
  1784. right of the operator. For example, "a > b". 'a' is on the left side, 
  1785. 'b' is on the right side, and the operator is '>' which means 
  1786. "greater than". Relational operators can be expressed using 
  1787. mathematical notation (">", "<", "<>", ">=") or by using English  
  1788. forms of the same relation, such as "GREATER THAN", "LESS 
  1789. THAN", etc).
  1790. Comments 
  1791. Comments are surrounded on both sides by "curly braces". 
  1792. These are the characters at the right of your keyboard. They 
  1793. look like this:
  1794.     {    - Left "curly brace"
  1795.     }    - Right "curly brace"
  1796.  
  1797. You can place these "curly braces" around any thing in your 
  1798. script file that you do not want TAS see. It is only for your eyes 
  1799. and the eyes of other humans.
  1800. Pre-Defined Variables
  1801. Predefined Variables are variables that are "filled in" when each 
  1802. MSP TICKER is processed or at specific times during the 
  1803. processing of ticker files.
  1804.  
  1805. TICKER    The 'ticker' symbol, e.g., AXP
  1806.  
  1807. FULLNAME    The 'full name', e.g., AMERICAN 
  1808. EXPRESS
  1809.  
  1810. DATAPATH    contains the DOS file name of the data 
  1811. subdirectory currently being processed.
  1812.  
  1813. TICKER_PERIOD    contains the periodicity of the ticker file. 
  1814. This is taken from the Metastock 
  1815. PERIOD field. 
  1816.  
  1817. QUOTE_COUNT    The number of quotes in the file
  1818.  
  1819. QUOTE_RANGE    Initially set to QUOTE_COUNT by TAS. 
  1820. This variable can be modified by the 
  1821. script to set the index of the last quote in 
  1822. the file for computation. Somewhat 
  1823. similar to the Metastock REF function.. 
  1824.  
  1825. FIRST_TICKER    Variable, which, if equal to 1 (one), 
  1826. indicates this ticker is the first to be 
  1827. processed. 
  1828.  
  1829. LAST_TICKER    Variable, which, if equal to 1 (one), 
  1830. indicates this ticker is the last to be 
  1831. processed.
  1832.  
  1833. DATE    The date of the latest quote in the file in 
  1834. the format MM/DD/YY.
  1835.  
  1836. P    The "last computed" array. For example, 
  1837.     X := MOV(C,30,'E') 
  1838.     places the last day's 30day EMA in 'X' 
  1839. and the entire EMA array is in 'P' until 
  1840. another function is called.
  1841.  
  1842. PLOT_PHASE    Variable which is set to 1 when the Profit 
  1843. Test Script is entered for the first time 
  1844. for a ticker.
  1845.  
  1846. TEST_PHASE    Variable which is set to 1 when the Profit 
  1847. Test Script is entered for the EACH 
  1848. quote for a ticker.
  1849. END_PHASE    Variable which is set to 1 when the Profit 
  1850. Test Script is entered for the last quote 
  1851. for a ticker. 
  1852. Pre-Defined DATA Arrays
  1853. A pre-defined DATA Array contains one entry of one type of 
  1854. value for each day in the ticker file. There are as many entries in 
  1855. each array as there are days loaded for the ticker.  
  1856.  
  1857. Unlike user-defined arrays,  the pre-defined arrays should not 
  1858. be defined within the script with the array declaration. Since 
  1859. they are pre-defined, they are always available for use within 
  1860. the script.  There are two ways to refer to each of the pre-
  1861. defined arrays. There is an English language name, such as 
  1862. CLOSE and a "short variable name", such as "C", for the Closing 
  1863. Price array. The names for the pre-defined arrays are shown in 
  1864. the table that follows:
  1865.  
  1866.  
  1867. Pre-defined DATA Arrays
  1868.  
  1869. English language 
  1870. name for array
  1871. Short 
  1872. Variable 
  1873. Name
  1874. Description
  1875.  
  1876. OPEN
  1877. O
  1878. The OPEN PRICE 
  1879. "data array"
  1880.  
  1881. HIGH
  1882. H
  1883. The HIGH "data 
  1884. array"
  1885.  
  1886. LOW
  1887. L
  1888. The LOW  "data 
  1889. array"
  1890.  
  1891. CLOSE
  1892. C
  1893. The CLOSE "data 
  1894. array"
  1895.  
  1896. VOLUME
  1897. V
  1898. The VOLUME 
  1899. "data array"
  1900.  
  1901. OPEN_INTEREST
  1902. OI
  1903. The OPEN 
  1904. INTEREST "data 
  1905. array"
  1906.  
  1907. INDEX
  1908. INDEX
  1909. Array containing 
  1910. the CLOSE quotes 
  1911. for a TICKER 
  1912. defined by an 
  1913. INDEX command.
  1914.  
  1915. DATES
  1916. DATES
  1917. Array of DATES 
  1918. associated with 
  1919. each of the price 
  1920. entries. These dates 
  1921. are in number 
  1922. format, not string 
  1923. format.
  1924.  
  1925.  
  1926.  
  1927.  
  1928. Pre-defined Functions
  1929. TAS functions which are also available in MetaStock have the 
  1930. same names and (nearly the same) parameters as those 
  1931. documented in the MSP Custom Formulas Section of the MSP 
  1932. "User's Manual". 
  1933.  
  1934. Functions which are unique to TAS (not shared by MetaStock) 
  1935. are described in detail in this document. The MetaStock 
  1936. functions are only summarized. Please refer to the Metastock 
  1937. documentation or the Encyclopedia of Technical Market 
  1938. Indicators for a complete description of the functions and their 
  1939. parameters.
  1940.  
  1941. In some instances, the parameter to an MetaStock named 
  1942. function has to have single quotes around it. This is the case 
  1943. with any function that passes a single character as a parameter, 
  1944. such as the last parameter in the "mov" (Moving Average) 
  1945. function.
  1946. Technical Indicators available in Metastock
  1947. ad()    Accumulation/Distribution
  1948. adx(p)    Average Directional Movement
  1949. adxr(p)    Average Directional Movement Rating
  1950. add(a,b)    Add two arrays
  1951. Add each element of array "a" to the corresponding 
  1952. element of array "b".
  1953. cci(p)    Commodity Channel Index Array
  1954. p = number of periods
  1955. co()    Chaikin's Oscillator 
  1956. cos(a)    Trigonometric cosine 
  1957. of each entry in array 'a'
  1958. cum(a)    Cumulative Sum of Array "a"
  1959. div(a,b)    Divide two arrays
  1960. Divide each element of array "a" by an element of array 
  1961. "b".
  1962. dmi(p)    Directional Movement Index
  1963. exp(a)    Exponential Function 
  1964. hhv(a,p)    Highest High Value
  1965. Returns Highest High Value in the array 'a' for the period 
  1966. 'p'
  1967. llv(a,p)    Lowest Low Value
  1968. Returns Lowest Low Value in the array 'a' for the period 'p'
  1969. log(a)    Exponential Logarithm of each entry in 
  1970. array 'a'
  1971. macd()    Moving Average Convergence/Divergence
  1972. mdi(p)    Minus Directional Movement (-DI)
  1973. mo(p)    Momentum Array
  1974. p = number of periods
  1975. mov(d,p,t)    Compute Moving Average 
  1976. Moving Average Array
  1977.     d = Data Array
  1978.     p = number of periods 
  1979.     t = Moving Average Type 
  1980.         'E' - Exponential
  1981.         'S' - Simple
  1982.         'W' - Weighted
  1983. mul(a,b)    Multiply two arrays
  1984. Multiply each element of array "a" by the corresponding 
  1985. element of array "b".
  1986. neg(a)    Negative of Array "a"
  1987. nvi()    Negative Volume Indicator
  1988. obv()    On Balance Volume
  1989. oscp(p1,p2,t,r)      Price Oscillator
  1990. Price Oscillator formed by subtracting a "t" type "p2" day 
  1991. moving average of the Closing Price from a "t" type "p1" 
  1992. day moving average of the Closing Price. 
  1993.     p1 = shorter moving average period 
  1994.     p2 = longer moving average period
  1995. t = Moving Average Type 
  1996.     'E' - Exponential
  1997.     'S' - Simple
  1998.     'W' - Weighted
  1999. r = ROC Type 
  2000.     '%' - percentage ROC
  2001.     '$' - Unit ROC
  2002. oscv(p1,p2,t,r)     Volume Oscillator
  2003. Volume Oscillator formed by subtracting a "t" type "p2" 
  2004. day moving average of the Volume from a "t" type "p1" 
  2005. day moving average of the Volume. 
  2006.     p1 = shorter moving average period 
  2007.     p2 = longer moving average period
  2008.         t = Moving Average Type 
  2009.             'E' - Exponential
  2010.             'S' - Simple
  2011.             'W' - Weighted
  2012.  
  2013.     r = ROC Type 
  2014.         '%' - percentage ROC
  2015.         '$' - Unit ROC
  2016. pdi(p)    Positive Directional Movement (+DI)
  2017. per()    Performance Indicator
  2018. Performance Indicator computed as follows:
  2019.     per[i] = ()CLOSE[i]CLOSE[1] - 1 * 100
  2020. pvi()    Positive Volume Indicator
  2021. rsi(p)    Wilder's Relative Strength Indicator
  2022. p = number of periods 
  2023. roc(d,p,r)    Rate Of Change Array
  2024.     d = Data Array
  2025.     p = number of periods 
  2026.     r = ROC Type 
  2027.         '%' - percentage ROC
  2028.         '$' - Unit ROC
  2029. sar(i,m)    Wilder's Parabolic Stop and Reverse (SAR)
  2030.  indicator. Create a parabolic stop line either over or under 
  2031. the price graph.
  2032. where 
  2033.      'i' = increment value and initial 
  2034.      'm' = maximum acceleration factor
  2035.  
  2036. Wilder's explanation uses the values of  i = .02 and m= 0.20
  2037.  
  2038. In ChartPro, this indicator is referred to as Technical Study 
  2039. 'PTP'
  2040. sin(a)    Trigonometric sine of each entry in array 'a'
  2041. sqrt(a)    Square root of each entry in array 'a'
  2042. std(d,p)    Statistical Standard Deviation. 
  2043. Computes the standard deviation of the array 'd' using 'p' 
  2044. data points. Defined as the square root of the variance (see 
  2045. var below).
  2046. stoch(p,s)    Stochastic Oscillator
  2047.     p = number of periods
  2048.     s = k slowing periods 
  2049. sub(a,b)    Subtract one array from another
  2050. Subtract each element of array "b  from the corresponding 
  2051. element of array "a".
  2052. sum(a,p)    Summation of array over period
  2053. Create a 'p' day summation of array 'a'.
  2054. tan(a)    Trigonometric tangent 
  2055. of each entry in array 'a'
  2056. trix(p)    TRIX Function
  2057. Calculate a 1 day percent Rate of Change of a p day triple 
  2058. exponential moving average of the closing price.
  2059. tsf(a,p)    Time Series Forecast  function. 
  2060. This function computes a p day linear regression of the 
  2061. array a for each day. 
  2062. var(d,p)    Statistical VARIANCE 
  2063. of the array 'p' over the time period 'p'. 
  2064. vol(pm,pr)    Volatility Indicator. 
  2065. This is the 'pr' day Rate Of Change Oscillator of a 'pm' day 
  2066. exponential Moving Average of the difference between 
  2067. each day's high and low price.
  2068. wc()    Weighted Close
  2069.  defined as (2 * CLOSE + HIGH + LOW)/4
  2070. willa()    William's Accumulation/Distribution. 
  2071. willr(p)    William's %R 
  2072. for 'p' periods. This is equivalent to a 'p' period stochastic 
  2073. with 1 day smoothing. The result is then reduced by 100.  
  2074.  
  2075. zig(a,r,t)    Zig Zag Function
  2076. Compute a ZIG ZAG function for array 'a'. 'r' is the 
  2077. minimum percentage or unit (dollar) change which must 
  2078. be made in order to reflect a change in the Zig Zag line. 
  2079. The third parameter 't' is either '%' or '$'. If it is '%', then 
  2080. the 'r' value is expressed as a percentage change, otherwise 
  2081. it is a unit (or dollar) change. 
  2082. If you want to see what kind of profits you could make, 
  2083. run the ZIG.PTS Profit Test file.  According the Equis 
  2084. Metastock User's Manual, "The Zig Zag indicator has 
  2085. 20/20  hindsight...Unfortunately, the Zig Zag's foresight is 
  2086. not as profitable. This is because the last "leg" of the Zig 
  2087. Zag indicator isn't fixed until future prices are known. If 
  2088. you use the Zig Zag  indicator to predict future prices, you 
  2089. are probably fooling yourself." Sorry, but that's the way it 
  2090. works. It is provided in TAS as a sort  of "benchmark" to 
  2091. judge how much the IDEAL strategy could SQUEEZE  out 
  2092. of a portfolio. It is nearly ideal, because it knows the 
  2093. future.
  2094. TAS Functions
  2095. angle(a)    Angle of a line
  2096. returns the angle in degrees of the line described by the 
  2097. array 'a'. This function is only usable on an array that has 
  2098. been created by either linreg or linreg2.
  2099. alpha()    Alpha function
  2100. The alpha function is a "sister" function of the beta 
  2101. function. This function describes how much the stock's 
  2102. price would have moved on average on a yearly basis 
  2103. assuming the INDEX did not change. An alpha  of .20 
  2104. means that the stock would have increased  20% more than 
  2105. the INDEX during the year. 
  2106. In terms of a two way linear regression (performed by the 
  2107. beta function), the alpha is  related to the y-intercept of the 
  2108. linear regression line.
  2109. It is important to note that the alpha function must be 
  2110. called immediately after the beta function. At any other 
  2111. time, the results of the alpha  function are undefined.
  2112. avgprc()    Average Price
  2113. Creates an array where each entry is that day's 
  2114. (HIGH+LOW+CLOSE)/3
  2115. bbandt(p,s)    Top Bollinger Band
  2116. Bollinger Band upper (top) indicator for "p" periods with 
  2117. "s" standard deviations added to the p-day simple moving 
  2118. average.
  2119. bbandb(p,s)    Bottom Bollinger Band
  2120. Bollinger Band lower (bottom) indicator for "p" periods 
  2121. with "s" standard deviations subtracted from the p-day 
  2122. simple moving average.
  2123. beta(r)    "Beta" function
  2124. The beta function calculates the linear regression of the 
  2125. percentage rate of change of the closing price (of the 
  2126. current ticker being processed) to the percentage rate of 
  2127. change of the INDEX. 
  2128. Values of r, the rate of change period, are 
  2129.     'D'    Daily rate of change
  2130.     'W'    Weekly rate of change
  2131.     'M'    Monthly rate of change
  2132. The weekly rate of change calculates the rate of change 
  2133. from Friday to Friday and the monthly rate of change 
  2134. calculates the rate of change from the first of each month.
  2135.  
  2136. The actual value returned by the beta function is the slope 
  2137. of the line created by this two way linear regression.
  2138.  
  2139. The purpose of the beta function is to measure the stock's 
  2140. sensitivity to movement in the general market over the 
  2141. period of time chosen. A beta value of 2.00 means that the 
  2142. stock tends to move with the market, but 2 times as far 
  2143. (percentage change is twic as much). A beta of -.5 means 
  2144. that the stock moves in the opposite direction of the 
  2145. market, but only one half as far. 
  2146. corrcoef()    Correlation Coefficient
  2147. returns the "correlation coefficient" of the last linear 
  2148. regression performed. This value ranges from -100 to +100. 
  2149. If the data points match the points in the linear regression 
  2150. approximation, the correlation coefficient will be 100. If the 
  2151. points show no correlation with the approximation, the 
  2152. correlation coefficient will be zero.  
  2153.  
  2154. datestr(d)    Create a formatted date
  2155. Create a "date string" in the form MM/DD/YY from the 
  2156. DATES array entry 'd'. 
  2157.  
  2158. daymon(d)    Day of Month function
  2159. Returns the "DAY OF THE MONTH" of the DATE 
  2160. contained in variable "d". The value returned is the day of 
  2161. the month. For example, daymon(910204) will return 4.  
  2162.  
  2163. daywk(d)    Day of Week function
  2164. Returns the "DAY OF THE WEEK" of the DATE contained 
  2165. in variable "d". The value returned is a number from 0 to 6, 
  2166. where 0 is Sunday, 1 is Monday, 2 is Tuesday, 3 is 
  2167. Wednesday, 4 is Thursday, 5 is Friday and 6 is Saturday.
  2168.  
  2169. divby(a,x)    Divide array by number
  2170. Divide each element of array "a" by the value of "x". In this 
  2171. case, "x" is a single number.
  2172.  
  2173. dump_array(a1,a2...aN) Dump Array Contents
  2174. Dump the contents of arrays"a1" to "aN" to the screen or a 
  2175. file. Each entry in the array is shown as a decimal number 
  2176. with the entry number in square brackets to the left, 
  2177. followed by the date. DUMP_ARRAY can be called with 
  2178. up to 12 array names. They will be printed side-by-side on 
  2179. the display.
  2180. This function is useful for checking out the contents of an 
  2181. array...in other words, it is a debugging tool, not a report 
  2182. generating tool.
  2183.  
  2184. int(x)    Create Integer
  2185. Turns the number "x" into an "integer" by dropping any 
  2186. part of the number to the right of the decimal point. An 
  2187. integer is a number without a fractional part (the part after 
  2188. the decimal). The maximum number that you can turn into 
  2189. an integer is 32,767.
  2190.  
  2191. isect(a,b)     Find array intersection
  2192. Find the latest intersecting point of the two arrays "a" and 
  2193. "b". Returns the number of days since the two arrays 
  2194. intersected or -1 (negative one) if they have never 
  2195. intersected. 
  2196.  
  2197. NOTE: 
  2198. Since the graph of the two arrays actually crosses 
  2199. BETWEEN two days, the value returned will be the later 
  2200. day AFTER the crossing. For example, if the arrays crossed 
  2201. between yesterday and today, the value returned will be 
  2202. zero. If they crossed between two days ago and yesterday, 
  2203. the value returned will be 1, and so forth.
  2204.  
  2205. linreg    Linear Regression over time
  2206. linreg(a,s,e)    Create a linear regression line using 
  2207. "least-squares" method to find the mathematical average of 
  2208. the values in the array "a" starting at entry "s" and ending 
  2209. at entry "e". If "s" is zero, it refers to the first value in the 
  2210. array. If "e" is zero, it refers to the last value in the array. 
  2211. Positive values for "s" or "e" refer to the appropriate array 
  2212. entries (counting from 0). 
  2213. A negative number in the "s" or "e" index is subtracted 
  2214. from the total number of entries in the array to get the 
  2215. appropriate positive array index. For example,
  2216.         x : array;
  2217.         x := linreg(c,-50,-10);
  2218. will find the line passing most closely through the closing 
  2219. prices from 50 days before the last day in the file to 10 days 
  2220. before the last day in the file.
  2221.  
  2222. linreg2    Linear Regression of two variables
  2223. linreg2(y,x,s,e)
  2224. Create a linear regression line using "least-squares" 
  2225. method to find the mathematical  average of the values in 
  2226. the array y over the array x starting at entry "s" and ending 
  2227. at entry "e". If "s" is zero, it refers to the first value in the 
  2228. array. If "e" is zero, it refers to the last value in the array. 
  2229. Positive values for "s" or "e" refer to the appropriate array 
  2230. entries (counting from 0). 
  2231.     A negative number in the "s" or "e" index is subtracted 
  2232. from the total number of entries in the array to get the 
  2233. appropriate positive array index. For example,
  2234.         x : array;
  2235.         x := linreg2(c,v,-50,-10);
  2236. will find the line passing most closely through the closing 
  2237. prices and volume from 50 days before the last day in the 
  2238. file to 10 days before the last day in the file.
  2239.  
  2240. load(t,f)    Load a data array
  2241. The load function will retrieve the first occurrence of a ticker 
  2242. from the Metastock directory. The ticker is specified as the first 
  2243. parameter to the load function. 
  2244.  
  2245. The second parameter of the load function is the field to be 
  2246. loaded from the ticker file. The name of the field must be 
  2247. surrounded by single quotes or it must be a string variable 
  2248. containing the name of the field. The field names are the same 
  2249. as the pre-defined data array names, that is, C for closing price, 
  2250. H for high price, etc.
  2251.  
  2252. The value returned from the load function is an array 
  2253. containing the portion of the ticker file requested by the field 
  2254. name. 
  2255. mfi(p)    "Money Flow Index" 
  2256. as described in Equis "The Pointer" Volume 5, Number 4 
  2257. and corrected in Vol 6, Number 1.
  2258. month(d)    Month function
  2259. Returns the Month (1-12) of the date value contained in the 
  2260. parameter.
  2261. mulby(a,x)      Multiply by number
  2262. Multiply each element of array "a" by the value of "x". In 
  2263. this case, "x" is a single number.
  2264.  
  2265. over(a,b)    Over function
  2266. If array "a" is "over" array "b", this function returns the 
  2267. number of days since array "a" crossed above array "b".  
  2268. See the note under the "isect" function.
  2269.  
  2270. peak(a,n)    Find Peak in Array
  2271. returns the index of the 'n'-th peak value in array 'a'. A 
  2272. 'peak' is defined as a high value surrounded by lower 
  2273. values. The value returned from this function is the array 
  2274. index to the peak value. 
  2275.  
  2276. In the figure above, the peak(C,2) call would return the 
  2277. index of the point marked P2. If you consider the volume 
  2278. vertical bars a day, then the value returned in this example 
  2279. would be '-13', or 13 days prior to the last day.
  2280.  
  2281. per1(a)    Performance using Array
  2282. Computes the "performance indicator" for an array a. The 
  2283. performance indicator is computed as 
  2284.         
  2285. per(a) = ()a[1]a[0]-1 * 100
  2286.                               
  2287. set(a,v)    Set Array to Value
  2288. Sets all entries in array 'a' to the value 'v'. For example, you 
  2289. could use this function to create an array where each entry 
  2290. is 22.5. 
  2291.  
  2292. slope(a)    Slope of Line
  2293. will return the mathematical "slope" of the line whose 
  2294. points are contained in array "a". This array must have 
  2295. been created with the linreg function.
  2296.  
  2297. trough(a,n)    Find Trough in Array
  2298. returns the index of the 'n'-th "trough" value in array 'a'. A 
  2299. 'trough' is defined as a low value surrounded by higher 
  2300. values. The value returned from this function is the array 
  2301. index to the trough value.      
  2302.  
  2303. In the figure shown with the peak function above, the 
  2304. trough(C,2) call would return the index of the point 
  2305. marked 'T2'.  Based on the volume bars shown, the value 
  2306. returned in this example would be '-11', or 11 days prior to 
  2307. the last day.
  2308.  
  2309. tr()    Wilder's True Range 
  2310. This function creates an array containing for each day, the 
  2311. higher of the following differences :
  2312. Between today's high and today's low.
  2313. Between today's high and yesterday's close.
  2314. Between today's low and yesterday's close.
  2315.     
  2316. The value of tr() for any day is always positive or zero.
  2317.  
  2318. year(d)    Year function
  2319. Returns the Year (0-99) of the date value contained in the 
  2320. parameter.
  2321.  
  2322. zero(a)    Zero Array
  2323. Sets each entry of array 'a' to zero.
  2324.  
  2325.  
  2326.  
  2327. Output Functions
  2328. WRITE and WRITELN Output Functions
  2329. There are two direct output functions, WRITE and WRITELN. 
  2330. The WRITELN function is identical to the WRITE function, 
  2331. except that WRITELN causes a NEW LINE to be added at the 
  2332. end of the last field. 
  2333.  
  2334. The parameters to WRITE (and WRITELN) are either text 
  2335. strings, like 'this is a text string', surrounded by single quotes ('), 
  2336. or "variable values". A variable value is a value that you have 
  2337. assigned to a name by use of a formula or constant setting. 
  2338. There are "pre-defined" variables, such as H, L, C, V, O, 
  2339. TICKER, FULLNAME. These pre-defined variables are "filled 
  2340. in" when TAS reads the data values for each symbol. 
  2341.  
  2342. You can control the formatting of your output to some extent by 
  2343. using the characters sequence "\t" (backslash tee) in your text 
  2344. string. This will place a "tab" character in the output. TAS places 
  2345. "tab stops" every 4 columns of the output line.
  2346.  
  2347. In addition, the sizes of the two types of "numbers", are 
  2348. constant. If you are printing an INTEGER value, it is five 
  2349. characters wide, left-justified. If you are printing a number with 
  2350. a decimal point, it is eight characters wide (99999.999). This will 
  2351. allow you to line up the output with column headings.
  2352. SORT Functions
  2353. TAS contains functions which can be used to sort your report 
  2354. output. Rather than doing WRITE and WRITELN, you can call 
  2355. the SORTOUT function to place the report data in a "sort 
  2356. buffer". Once all the tickers have been processed (when 
  2357. LAST_TICKER is 1), you can then sort the data using the 
  2358. SORTON function. Finally, you can retrieve the sorted "lines" 
  2359. with the SORTGET function or print them with the SORTPRINT 
  2360. function.
  2361.  
  2362. If you want to experiment with the SORT commands, you 
  2363. should start out simply and then work toward more complex 
  2364. combinations. These are advanced functions and are not 
  2365. necessarily appropriate for the person who doesn't want to plan 
  2366. their requirements. 
  2367.  
  2368. In order to understand how the  sort commands work, you 
  2369. need to understand some terms. The first term is a  "line".  Each 
  2370. time you use the SORTOUT function, you give it a "line" of data 
  2371. which is placed in the "sort buffer". Each "line" is composed of 
  2372. 'columns". A "column" is a group of data values that are 
  2373. repeated for each SORTOUT function.  So, for example, if you 
  2374. wanted to create a list of TICKERs and their Closing Prices, you 
  2375. would have two "columns", the TICKER and the Closing Price 
  2376. for the ticker. The "line" would consist of the combination of the 
  2377. TICKER and Closing Price.  
  2378. SORTOUT
  2379. The SORTOUT function takes up to 40 parameters which are 
  2380. fields to be placed in the 'sort buffer'. As each ticker is 
  2381. processed, you can place the computed results in the 'sort 
  2382. buffer'. 
  2383.  
  2384. For example, suppose you wanted to create a report of tickers in 
  2385. order by their volume. You wanted the report to contain the 
  2386. TICKER, the High, Low and Closing prices as well. For each 
  2387. ticker you would say
  2388. SORTOUT(TICKER,H,L,C,V);
  2389. SORTON
  2390. Once all tickers have been processed, and their lines of data 
  2391. have been placed in the sort buffer using the SORTOUT 
  2392. function, you can sort the lines of data with the SORTON 
  2393. function. The SORTON function requires pairs of two 
  2394. parameters as follows:
  2395.  
  2396. SORTON(column_number_1, 
  2397. direction_1,column_number_2, 
  2398. direction_2,....,column_number_N,direction_N)
  2399.  
  2400. where: 
  2401. column_number_*     is the parameter position of the data 
  2402. field  (column) in the SORTOUT command 
  2403. that placed the data in the sort buffer.
  2404. direction_*     is either 'a' for ASCENDING or 'd' for 
  2405. DESCENDING sort.
  2406.  
  2407. The SORTON function will sort first on column_number_1 in 
  2408. direction_1, then on the next column/direction pair, etc. 
  2409. Using the example given in the SORTOUT description above, 
  2410. since the report was to be sorted by VOLUME, that is the 5th 
  2411. parameter position ("column") in the SORTOUT function 
  2412. shown.
  2413. SORTGET
  2414. After a SORTON function is called, the data in the sort array is 
  2415. in some particular sorting order. If you want to retrieve each 
  2416. "line" from the sort array, one at a time, you can use the 
  2417. SORTGET function.  When you use the SORTGET function, 
  2418. you are asking TAS to "retrieve" the columns of data in the next 
  2419. line from the sort buffer and to place those data values in the 
  2420. variables you specify as parameters to the SORTGET function. 
  2421.  
  2422. After the SORTGET function returns, the variables you named 
  2423. in the SORTGET function call will be "filled in" with the values 
  2424. from the next line (in sequence) of the sort buffer. 
  2425.  
  2426. SORTGET(v1,v2,v3,....,vN)
  2427.  
  2428. where 
  2429. v1     is the first variable to be filled in by SORTGET
  2430. v2     is the second variable to be filled in by SORTGET,
  2431. and
  2432. vN     is the last variable to be filled in by SORTGET. 
  2433. The number "N" must be exactly equal to 
  2434. the number of parameters used in the 
  2435. SORTOUT command that filled in the sort 
  2436. buffer.
  2437.     
  2438. SORTPRINT
  2439. The trickiest part of using the SORT feature is the specification 
  2440. of the 'format string' used by the SORTPRINT function. If you 
  2441. have access to a C Programming book, you will find the format 
  2442. specifications under the PRINTF() function description. Short of 
  2443. that, a summary of the types of format specifiers follows:
  2444.  
  2445. A format specifier is formed as follows:
  2446.     % [width] [.prec] [type]
  2447.  
  2448. The [width] is the minimum number of characters to print.
  2449.  
  2450. The [.prec] is the maximum number of characters to print or the 
  2451. minimum number of digits to print.
  2452.  
  2453. [type] is one of three values:
  2454. 'ld'    for INTEGER values (result of INT() function)
  2455. 'f'    for REAL numbers (most results)
  2456. 's'    for a STRING CONSTANT (like TICKER or DATE)
  2457.  
  2458. So, to print the results of the SORTOUT request given above, 
  2459. there must be five format specifiers (since there are five 
  2460. parameters to SORTOUT). The first parameter is the TICKER 
  2461. (which is a 'string') so its format specifier would simply be '%s'. 
  2462.  
  2463. The next three fields are all 'real' numbers (that is, they have 
  2464. decimal points), so their format could be '%7.3f' which would 
  2465. say, make the field 7 characters wide, and include three decimal 
  2466. places, like this '999.999', so this will work fine unless the price 
  2467. is greater than 1000. If it were, you could make the field '%8.3f' 
  2468. to add more room at the left. 
  2469.  
  2470. Finally, the last field, V (VOLUME) does not contain any 
  2471. portion beyond the decimal point. That is, shares are reported 
  2472. in whole numbers. But, because Volume is typically larger than 
  2473. the maximum value of an "integer" field (32,767) , it is also a 
  2474. 'REAL' number. To make the volume field report in whole 
  2475. units, without a decimal point, you would say '%8.0f' which 
  2476. would place volume in an eight character field with no decimal. 
  2477.  
  2478. So, the format string for the SORTPRINT would be:
  2479. SORTPRINT('%s %7.2f %7.2f %7.2f %8.0f\n');
  2480.  
  2481. The '\n' at the end of the SORTPRINT format string is to start a 
  2482. NEW LINE after printing this line.
  2483. Column Headings 
  2484. For an example of controlling the printing of 'headings' in your 
  2485. TAS output, go to the section describing the pre-defined 
  2486. variable FIRST_TICKER. Using this variable, you can determine 
  2487. when to print a heading initially in your report. 
  2488.  
  2489. In addition, since all variables are initially set to zero before the 
  2490. first TICKER file is processed, you can use a variable to 
  2491. accumulate a "line count". You can test this variable and 
  2492. generate a new heading each time it is greater than the number 
  2493. of lines on your page (e.g. 66). An example of how to place a 
  2494. heading on each page of the report follows:
  2495.  
  2496. IF FIRST_TICKER OR (LINE_COUNT > 65) THEN 
  2497. BEGIN
  2498. LINE_COUNT := 0;
  2499. WRITELN('YOUR REPORT HEADING WOULD GO HERE');
  2500. END;
  2501.  
  2502.  
  2503. Then, each time you wrote a line in your script you would 
  2504. execute the statement: LINE_COUNT := LINE_COUNT + 1;
  2505.  
  2506.  
  2507.  
  2508. Profit Test Statements
  2509. Profit Test Statements are used to: 
  2510.  
  2511. Define which Technical Indicators are to be computed.
  2512.  
  2513. Define BUY conditions
  2514.  
  2515. Define SELL conditions
  2516.  
  2517. Define STOP conditions
  2518.  
  2519. The statements used to describe the situations above are 
  2520. described in the next 4 sections. 
  2521. PLOT statement: Define Technical Indicators 
  2522. The PLOT statement is used to create the formulas or indicators 
  2523. which will be used in the subsequent profit test. The PLOT 
  2524. statement is executed once per ticker symbol, and must be 
  2525. placed prior to any of the BUY/SELL/STOP WHEN conditions. 
  2526.  
  2527. The format of the PLOT statement is:
  2528.  
  2529.     PLOT stmt;
  2530.  
  2531. where 'stmt' can be a single statement or a BEGIN..END block. 
  2532. For example, if your profit test is to test the Commodity 
  2533. Channel Index (CCI) for 14 days, you could say:
  2534.  
  2535. CCI_ARRAY : ARRAY;    { Define the cci array}
  2536. PLOT CCI_ARRAY := CCI(14);
  2537.  
  2538. In the example, only one indicator is computed, so there was no 
  2539. need to use the BEGIN..END block. Suppose, however, that we 
  2540. want to incorporate Wilder's RSI in the profit test as well. Then 
  2541. we would say:
  2542.  
  2543. CCI_ARRAY : ARRAY;    { Define the cci array}
  2544. RSI_ARRAY : ARRAY;    { Define the rsi array}
  2545. PLOT BEGIN
  2546.     CCI_ARRAY := CCI(14);
  2547.     RSI_ARRAY := RSI(14);
  2548. END;   { of PLOT statement}
  2549. BUY WHEN - Define BUY Conditions
  2550. The BUY WHEN condition causes the profit tester to 'buy' the 
  2551. stock if the condition is true.
  2552.  
  2553.     BUY WHEN expression;
  2554.  
  2555. where 'expression' can be any combination of logical or 
  2556. relational operators. 
  2557.  
  2558. For example, using the last PLOT statement in the previous 
  2559. example, we will issue a BUY signal when the CCI rises above 
  2560. -100 and the RSI is less than 40:
  2561.  
  2562. BUY WHEN cci_array[-1] < -100 
  2563.     AND cci_array[0] > -100 
  2564.     AND rsi_array < 40;
  2565. SELL WHEN - Define SELL Conditions
  2566. The SELL WHEN condition causes the profit tester to 'sell' the 
  2567. stock if the condition is true.
  2568.  
  2569. SELL WHEN expression;
  2570.  
  2571. where 'expression' can be any combination of logical or 
  2572. relational operators. 
  2573.  
  2574. For example, using the last PLOT statement in the previous 
  2575. example, we will issue a SELL signal when the CCI drops below 
  2576. 100 and the RSI is greater than 60:
  2577.  
  2578.     SELL WHEN cci_array[-1] > 100 
  2579.         AND cci_array[0] < 100 
  2580.         AND rsi_array > 60;
  2581. STOP (LONG or SHORT) Condition
  2582. The STOP LONG and STOP SHORT statements close a "long" 
  2583. position or a "short" position, respectively, by either selling or 
  2584. buying to cover an open position. 
  2585.  
  2586. To close out a long position (by selling), the statement is:
  2587.  
  2588. STOP LONG WHEN expression;
  2589.  
  2590. where 'expression' can be any combination of logical or 
  2591. relational operators. 
  2592.  
  2593. To close out a short position (by buying), the statement is:
  2594.  
  2595. STOP SHORT WHEN expression;
  2596.  
  2597. where 'expression' can be any combination of logical or 
  2598. relational operators. 
  2599.  
  2600. Adding a long stop to the example built in the prior sections, we 
  2601. could say that we want to issue a stop if, after having gone long, 
  2602. the CCI drops below -100 again. In that case, we could say:
  2603.  
  2604. STOP LONG WHEN cci_array < -100;
  2605. TAS Profit Tester Functions
  2606. The Profit Tester feature of TAS uses the following functions to 
  2607. indicate the buy/sell transactions controlled by a Profit Testing 
  2608. script. 
  2609.  
  2610. pt_buy()    Buy the stock at the current closing price 
  2611. if not already held. If testing Short 
  2612. positions, buy to 'cover' the short sale.
  2613.  
  2614. pt_sell()    Sell the stock at the current closing price 
  2615. if it has been bought. If testing Short 
  2616. positions, sell the stock short.
  2617.  
  2618. pt_stop(t)    Issue either a Long Stop or a Short Stop. 
  2619. The parameter 't' is either 'L' for a Long 
  2620. Stop, or 'S' for a Short Stop.
  2621.  
  2622. pt_price(t)    Returns the share price at which the last 
  2623. OPEN transaction was executed. If there 
  2624. is currently no position held, then the 
  2625. value returned depends on the value of 
  2626. the parameter t. If t' is 'L', the value 
  2627. returned is 0. If t is 'S', the value 
  2628. returned is 9999999. 
  2629.     The function is useful if you want to set a 
  2630. STOP based on the change in price. The 
  2631. parameter t is either 'L' for a Long 
  2632. Position, or 'S' for a Short Position.
  2633. pt_setprice(p)    Sets the price at which the next 
  2634. transaction will take place, where p is the 
  2635. price.
  2636.  
  2637. Profit Test Phases - Advanced Use Only
  2638. TAS runs the profit test in two phases. The first phase, called 
  2639. PLOT PHASE is when the script should compute the arrays to 
  2640. be tested during the next phase. This next phase is the TEST 
  2641. PHASE. This phase is entered for the data points of the ticker 
  2642. file. After all data points have been processed, the END PHASE 
  2643. indicator is set. Each 'phase' of the Profit Test process is 
  2644. indicated by a variable being equal to 1. 
  2645.  
  2646. The two phases are analogous to the steps you might run in 
  2647. Metastock to do the Profitability Test. First, you would plot an 
  2648. indicator, moving average, or custom formula. This is similar to 
  2649. the 'PLOT PHASE' in TAS. Next, you would run the Profit 
  2650. Tester specifying your Buy/Sell conditions. Metastock then 
  2651. applies your Buy/Sell signals to each plotted point on the 
  2652. graph, proceeding left to right until it reaches the last day 
  2653. loaded. This is the 'TEST PHASE' in TAS. 
  2654.  
  2655. When the TEST PHASE is entered with the last day of the ticker 
  2656. file, a variable, called 'END_PHASE' is set to 1. Testing this 
  2657. variable will allow you to print out the results for the Profit 
  2658. Test.
  2659.  
  2660. For each ticker, the script is entered once for the PLOT Phase, 
  2661. and then as many times as there are data points for the TEST 
  2662. Phase. 
  2663. If you use the PT_BUY, PT_SELL, PT_STOP, PT_PRICE 
  2664. functions, you will need to understand the different phases 
  2665. for the Profit Tester. However, if you use the BUY WHEN, 
  2666. SELL WHEN, STOP ... WHEN and PLOT forms of the Profit 
  2667. Test, you do not need to be concerned about the different 
  2668. Profit Tester phases, since the script generates the appropriate 
  2669. phase testing automatically. You should   use the BUY, SELL 
  2670. and STOP WHEN statements to do your PROFIT TESTING. 
  2671. See RSIPT.TAS for an example.
  2672.  
  2673.  
  2674. GRAPH Functions
  2675. The TAS GRAPH functions increase the power of TAS by 
  2676. making it possible to display the contents of any indicator, 
  2677. either builtin, or created by the user, in a graphical display. You 
  2678. can write a script that selects only those tickers with the 
  2679. conditions you are looking for, and when one of them is found, 
  2680. display a graph of the indicators and the stock price action.  Up 
  2681. to 10 individual graphs with up to 10 indicators on each graph 
  2682. can be displayed at once with the GRAPH feature. Individual 
  2683. graphs can be assigned their own sizes relative to the other 
  2684. graphs on the screen, or each graph can be the same size as the 
  2685. other graphs.  
  2686. OPENGRAPH
  2687. OPENGRAPH(numgraphs[,start,end])
  2688.  
  2689. This function prepares for numgraph graph windows to be 
  2690. displayed. The dates displayed are from quote start to quote 
  2691. number end. For example, to prepare to display 3 graphs of the 
  2692. last 50 days, you would say:
  2693.         OPENGRAPH(3,-50,0);
  2694. The start and end values are optional, so you don't have to 
  2695. specify them. If they are not specified, the default is to display 
  2696. from the first to the last quote. 
  2697. SIZEGRAPH
  2698. SIZEGRAPH(S1, S2,...Sn)
  2699.  
  2700. where S1..Sn are the number of 'shares' of the display area each 
  2701. graph prepared by the OPENGRAPH function will get when 
  2702. shown. For example, as above, with 3 graphs to be displayed, if 
  2703. you want the first graph to have 2 times as much space as the 
  2704. second or third, you would say
  2705.         SIZEGRAPH(2,1,1);
  2706. Note that there must be as many parameters to the SIZEGRAPH 
  2707. function as the number in the first parameter of the 
  2708. OPENGRAPH function (numgraphs above).
  2709. GRAPH
  2710. GRAPH(a1,l1,a2,l2...,aN,lN)
  2711. where a1 is the first array to be graphed, l1 is the legend (name 
  2712. to be displayed with) the graph of a1,  a2 is the second array and 
  2713. l2 is the second legend. Each of the arrays and legends specified 
  2714. in the GRAPH command are graphed in the same window, one 
  2715. on top of the other. For example, to graph +DI, -DI and ADX on 
  2716. the same graph, you would say
  2717. GRAPH(PDI(14),'+DI',MDI(14),'-DI',ADX(14),'ADX 14');
  2718. Simple as that.
  2719.  
  2720. There is a special 'array' named '1' which represents the Price 
  2721. Bar Chart normally seen in charts. So, to plot the price bar chart, 
  2722. you could say
  2723.        GRAPH(1);
  2724.  
  2725. DRAWLINE
  2726. DRAWLINE(color,x1,y1,x2,y2,start,end)
  2727.  
  2728. This function will draw a line from the point (x1,y1) to (x2,y2) 
  2729. starting at point start and ending at point end. The color 
  2730. parameter can be in the range from 0 (black) to 15 (white). 
  2731.  
  2732. The following table lists the color codes that can be used with 
  2733. the DRAWLINE function.
  2734.  
  2735. Color #
  2736. Color Generated
  2737.  
  2738. 0
  2739. BLACK 
  2740.  
  2741. 1
  2742. BLUE 
  2743.  
  2744. 2
  2745. GREEN 
  2746.  
  2747. 3
  2748. CYAN 
  2749.  
  2750. 4
  2751. RED 
  2752.  
  2753. 5
  2754. MAGENTA 
  2755.  
  2756. 6
  2757. BROWN 
  2758.  
  2759. 7
  2760. LIGHTGRAY 
  2761.  
  2762. 8
  2763. DARKGRAY 
  2764.  
  2765. 9
  2766. LIGHTBLUE 
  2767.  
  2768. 10
  2769. LIGHTGREEN
  2770.  
  2771. 11
  2772. LIGHTCYAN 
  2773.  
  2774. 12
  2775. LIGHTRED 
  2776.  
  2777. 13
  2778. LIGHTMAGENTA 
  2779.  
  2780. 14
  2781. YELLOW 
  2782.  
  2783. 15
  2784. WHITE
  2785.  
  2786.  
  2787. CLOSEGRAPH
  2788. CLOSEGRAPH()
  2789.  
  2790. The CLOSEGRAPH() function waits for you to hit any key. If 
  2791. you hit an ESC or CTRL-C the graphing (and the script) stop 
  2792. completely. Any other key will close the graph and go back to 
  2793. the regular TAS output display.
  2794.  
  2795. GRAPH EXAMPLES
  2796. Here is an example of a graph that shows how to draw a price 
  2797. graph with Bollinger Bands around it in the first (top) graph 
  2798. and the MACD indicator and its trigger in the bottom graph.
  2799.  
  2800. opengraph(2); 
  2801. graph(bband_top,bband_bot,1);
  2802. graph(macd(),'Macd',macdtrigger(),'Trigger');
  2803. closegraph();
  2804.  
  2805. The next figure shows a graph created by TAS using the 
  2806. following GRAPH commands:
  2807. opengraph(2);
  2808. sizegraph(2,1);
  2809. graph(1,'PRICE',
  2810.     bbandt(20,2),'BBAND TOP',
  2811.     bbandb(20,2),'BBAND BOT',
  2812.     mov(c,21,'e'),'21DAY EMA',
  2813.     mov(c,200,'e'),'200DAY EMA');
  2814. graph(rsi(14),'RSI 14');         { show RSI }
  2815. drawline(3,0,20,0,20);    
  2816. drawline(3,0,80,0,80);
  2817. closegraph();
  2818.  
  2819. The first statement above, opengraph(2), tells TAS to create 
  2820. space on the screen for 2 graph areas. The second statement, 
  2821. sizegraph(2,1), says to give the top graph 2 "shares" of space 
  2822. and the bottom graph 1 share of space. This effectively gives the 
  2823. top graph 2/3 of the screen and the bottom graph the remaining 
  2824. 1/3 of the screen.
  2825. The third statement
  2826.  
  2827.  graph(1,'PRICE',
  2828.     bbandt(20,2),'BBAND TOP',                    
  2829.     bbandb(20,2),'BBAND BOT',                    
  2830.     mov(c,21,'e'),'21DAY EMA',                  
  2831.         mov(c,200,'e'),'200DAY EMA')
  2832.  
  2833. defines the values to be graphed in the first (top) graph. The 
  2834. first value to graph is the "price bar chart" which has a special 
  2835. indicator name of "1". Then, two Bollinger Bands, top and 
  2836. bottom, are graphed . Finally, a 21 day Exponential Moving 
  2837. Average and a 200 day Exponential Moving Average are 
  2838. graphed. Each of these items to be graphed can be followed by a 
  2839. "legend" or title to be displayed on the graph in the color chosen 
  2840. for the line.  
  2841.  
  2842. The statement 
  2843.  
  2844.  graph(rsi(14),'RSI 14')
  2845.  
  2846.  tells TAS to place a graph of Wilder's Relative Strength Index in 
  2847. the second (bottom) graph. 
  2848.  
  2849. The next two statements,
  2850. drawline(3,0,20,0,20);    
  2851. drawline(3,0,80,0,80);
  2852. tell TAS to draw a line in blue from the left of the graph (just 
  2853. drawn) to the right of the graph at height 20 and 80. This is just 
  2854. adding the 20/80 lines to the RSI graph for ease of recognition 
  2855. of crossings to overbought/oversold conditions. 
  2856.  
  2857.  
  2858.  
  2859.  
  2860.  
  2861.  
  2862. TAS "POUND" (#) Commands
  2863. TAS "POUND" commands are used to control special script 
  2864. processing. They must begin with a "pound sign" ('#') in the first 
  2865. column of the line, and they must be completed on the same 
  2866. line. 
  2867.  
  2868. DO NOT USE A SEMI-COLON to terminate a POUND 
  2869. command, since they are not TAS script language statements, 
  2870. but are TAS run settings. You should not put comments at the 
  2871. end of a POUND command either.
  2872.  
  2873. "POUND" commands are executed by TAS only one time 
  2874. during the life of the script, as contrasted with other TAS script 
  2875. statements which are executed once for every ticker.
  2876. OUTPUT_FILE Command
  2877. You can direct the output of a script to a file by placing an 
  2878. #OUTPUT_FILE command in the script file. The 
  2879. #OUTPUT_FILE command must start in the first column of the 
  2880. line. It should be followed by the output file name surrounded 
  2881. by single quotes. 
  2882.  
  2883. If you want to direct your output to a PRINTER, for example, 
  2884. LPT1, you can use the #OUTPUT_FILE command, 
  2885. #OUTPUT_FILE 'LPT1'
  2886.  
  2887. For example,
  2888.  
  2889. #OUTPUT_FILE 'select.lst'
  2890.  
  2891. would place the output text of the script into the file 'select.lst'.
  2892. Appending to Output File
  2893. If you want to APPEND, or add to, the end of the output file, 
  2894. you can do so by placing a plus (+) character at the end of the 
  2895. output file name. From the example above,
  2896.  
  2897. #OUTPUT_FILE 'select.lst+'
  2898.  
  2899. would place the output of the script at the end of file "select.lst". 
  2900. This feature will be most useful if you are running several 
  2901. scripts in succession and want to place the output from different 
  2902. scripts into one output file.
  2903. Suppressing TAS Report Heading
  2904. In addition, if you want to suppress the headings that TAS 
  2905. normally puts out on its reports, you can do this with the 
  2906. OUTPUT_FILE command by placing the letter "N" after the file 
  2907. name (preceded by a space).
  2908. MAX_QUOTES Command
  2909. You can use the #MAX_QUOTES command to limit the number 
  2910. of quotes read into a script. This value must be less than the 
  2911. MAXIMUM QUOTES you specified in the TAS Configuration 
  2912. Menu. If it is less than the TAS Configuration Menu 
  2913. MAXIMUM QUOTES, it will override the quote count to read 
  2914. for the script in which it is contained only.
  2915.  
  2916. The format of the #MAX_QUOTES command is:
  2917.  
  2918.     #MAX_QUOTES nnn
  2919.  
  2920. where "nnn" is the number of quotes to read into TAS when this 
  2921. script is processed.
  2922. SCAN_DATE Command
  2923. You can use the #SCAN_DATE command to define the time 
  2924. frame you want to process. You can specify a beginning date, an 
  2925. ending date or both.  
  2926.  The SCAN_DATE command enables you to start loading 
  2927. quotes from a specific date (the start date)  and to stop loading 
  2928. quotes after a specific date (the end date).
  2929.  
  2930. The format of the #SCAN_DATE command is:
  2931.  
  2932. #SCAN_DATE start_date end_date
  2933.     or
  2934. #SCAN_DATE end_date
  2935.  
  2936. Both start_date and end_date can be in the following format
  2937. where yy is the year, mm is the month, and dd is the day :
  2938. yymmdd  ,e.g. 910302 for March 2, 1991
  2939. 'mm/dd/yy'    
  2940. mm/dd/yy
  2941.  
  2942. Some examples of the use of #SCAN_DATE are:
  2943.     #SCAN_DATE 910102 0
  2944. will start loading data on Jan 2, 1991 and load up to the last day 
  2945. in the file.
  2946.  
  2947.     #SCAN_DATE 910102 910915 
  2948. will start on Jan 2, 1991 and load up to Sept 15, 1991.
  2949.  
  2950. If there is no quote in the file for the start_date, the first date 
  2951. prior to the start_date will be loaded. 
  2952.  
  2953. If there is no quote in the file for the end_date,the first date prior 
  2954. to the end_date will be used.
  2955.  
  2956. Either the start_date or the end_date may be zero, in which case, 
  2957. it means to load from the beginning or the end of the file 
  2958. without regard to date, but taking into account the 
  2959. MAX_QUOTES range.
  2960. PROFIT_TEST Command
  2961. The #PROFIT_TEST command informs TAS of the type of profit 
  2962. test you want to run, whether you want to test "LONG", 
  2963. "SHORT" or "BOTH" long and short positions, and the amount 
  2964. of "money" you want your position to start with. This command 
  2965. must be placed in the front of the TAS script, prior to any 
  2966. statements which do not begin with a # sign.
  2967.  
  2968. The format of the #PROFIT_TEST command is:
  2969. #PROFIT_TEST type money
  2970.  
  2971. where 'type' is either LONG, SHORT or BOTH (for a "long" 
  2972. position test or a "short" position test, or a test of both Long and 
  2973. Short positions) and "money" is the amount of money with 
  2974. which to start the test for each symbol.
  2975. INDEX Command
  2976. The #INDEX command can be used to load an "index" data 
  2977. array, such as the SP500, DJIA or another stock. It tells TAS to 
  2978. access the ticker symbol contained in the command and place its 
  2979. CLOSING PRICES into a Pre-defined Data Array named 
  2980. "INDEX". 
  2981.  
  2982. The format of the INDEX Command is:
  2983.     #INDEX 'ticker'
  2984. where 'ticker' is the TICKER SYMBOL of the Index quote file. 
  2985. For example, if you had the SP 500 quotes in a file with a ticker 
  2986. name of "SP500", and you wanted to load it as the INDEX array, 
  2987. you would say 
  2988.     #INDEX 'SP500'
  2989.  
  2990. Later in the script, you could reference the array by the name of 
  2991. INDEX.
  2992. This command must be placed in the front of the TAS script, 
  2993. prior to any statements which do not begin with a # sign. It 
  2994. also should follow any #MAX_QUOTES statement that is in 
  2995. the script.
  2996.  
  2997. INCLUDE Command
  2998. The #INCLUDE command will "include" another file  into the 
  2999. current script as if that file were part of the script . Once the 
  3000. included file is read into TAS,  the original script is continued. 
  3001. You can include up to 8 levels of includes, that is, the included 
  3002. file can contain a #include and that file can contain one, etc., up 
  3003. to 8 levels.
  3004.  
  3005. The format of the #include command is 
  3006.     #INCLUDE filename
  3007. where filename is the name of a file in the current directory.
  3008.  
  3009.  
  3010. TAS Script Examples
  3011. Included with the TAS package are several sample .TAS script 
  3012. files. Check your directory after you install TAS to see the 
  3013. samples included. 
  3014. Putting Them Together
  3015. If the script has the statements:
  3016.  
  3017. todays_ma := mov(c,21,'E'); 
  3018. diff  := c[0] - todays_ma;        
  3019. if diff > 0 then 
  3020.     writeln(TICKER, ' IS ABOVE 21 DAY EMA BY ',diff);
  3021. else
  3022.     writeln(TICKER, ' IS BELOW 21 DAY EMA BY ',diff);
  3023.  
  3024. The script will print out the ticker name followed by the 
  3025. message indicating whether the latest close is above or below 
  3026. the 21 day EMA, and by how much. 
  3027.  
  3028. In this particular example, let's take a closer look at what is 
  3029. going on. In the first line, 
  3030.  
  3031. todays_ma := mov(c,21,'E'); 
  3032.  
  3033. we are computing the 21 day Exponential Moving Average of 
  3034. the Closing Price Array. Once computed, we are assigning the 
  3035. latest value of this moving average to the "variable" named 
  3036. 'todays_ma'. You could call it anything you want, but giving it a 
  3037. name that reminds you of what it contains is useful. 
  3038.  
  3039. If you wanted to keep the 21-day EMA in its own array. You 
  3040. could declare the variable as follows (before using it the first 
  3041. time):
  3042. big_ma_array : ARRAY;
  3043. This tells TAS that "big_ma_array" is an array of values, not just 
  3044. one value. So, if you now said:
  3045. big_ma_array := mov(c,21,'E');
  3046. the contents of big_ma_array would be ALL of the Moving 
  3047. Average values up to the latest day. To refer to the value of the 
  3048. 21 day EMA yesterday, we would write "big_ma_array[-1]" 
  3049. where the "[-1]" refers to the contents of the array "-1" days from 
  3050. now (in other words, one day ago). If you wanted to refer to the 
  3051. 21 day EMA 10 days ago, it would be "big_ma_array[-10]". If 
  3052. you wanted to refer to the latest day's 21 day EMA, it would be 
  3053. "big_ma_array[0]" (zero days ago). 
  3054.  
  3055. The next statement in the example is:
  3056.     diff  := c[0] - todays_ma;        
  3057. which assigns to the variable "diff" the value of the latest closing 
  3058. price, "c[0]", minus the latest 21 day EMA as computed and 
  3059. assigned to the variable "todays_ma" in the previous statement.
  3060. New High/New Low Example
  3061. The following script is contained in file "NHNL.TAS".
  3062. Script Contents
  3063. { NHNL.TAS-
  3064. This script example will show the 52 week high and low for each
  3065. ticker. If the current day's high is equal to the highest high
  3066. or the current low is equal to the lowest low, then we have a
  3067. probable new high or new low. It might also be the case that today's
  3068. high or low is just equal to the previous high or low.
  3069.  
  3070. Just to make the script slightly more interesting, we will also
  3071. compute the "percentage off from high", a frequently used metric
  3072. seen in financial tables.
  3073. }
  3074. if first_ticker then 
  3075. begin
  3076. writeln('              - CURRENT -       - 52 WEEK -     OFF');
  3077. writeln('TICKER       HIGH      LOW     HIGH      LOW    HIGH');
  3078. end;
  3079. high_value := HHV(h,52*5);        { compute high over 52 weeks }
  3080. low_value  := LLV(L,52*5);        { compute low over 52 weeks }
  3081.  
  3082. off_high_value := ((high_value - c) / high_value) * 100;
  3083. write(TICKER,' ',h,' ',l,' ',high_value,' ',low_value,
  3084. '\t',INT(off_high_value),'%');
  3085.  
  3086. if (high_value <= h) then       { today's high is new high  }
  3087.     write(' New High ');
  3088.  
  3089. if (low_value >= l) then        { today's low is new low }
  3090.     write(' New Low  ');
  3091.  
  3092. write('\n');        { end the line with a 'newline'}
  3093. Script Output
  3094. - CURRENT -       - 52 WEEK -     OFF
  3095. TICKER       HIGH      LOW     HIGH      LOW    HIGH
  3096. ABX        21.875   21.375   24.750   15.875    13%
  3097. AAPL       28.000   26.000   50.375   26.000    47% New Low  
  3098. ARIX        1.062    0.938    5.625    0.875    81%
  3099. BP%        12.500   11.125   14.500    6.000    17%
  3100. CMNT        2.312    2.188    3.500    2.063    33%
  3101. GR         32.125   31.875   57.500   29.500    44%
  3102. SWZ        12.125   11.750   17.500   10.875    32%
  3103. LA         11.625   10.375   50.375    9.750    77%
  3104. MXTR        5.625    5.250   16.500    5.250    66% New Low  
  3105. PCG        22.375   22.000   23.500   18.750    4%
  3106. TX         61.625   60.125   68.500   49.875    12%
  3107. UAL       110.000   99.000  286.750   87.250    64%
  3108. TICKER Symbol Processing
  3109. The following example shows how you could create a special 
  3110. script to notify you when certain stocks had reached prices you 
  3111. had set. This script is in "LIMIT.TAS". 
  3112. Script Contents
  3113. { limit.tas
  3114. This is an example of using a TAS script to watch your
  3115. stocks. 
  3116.  
  3117. It checks the ticker symbol against one of several
  3118. which you might (and I do) own. If the current close
  3119. (shown as 'c[0]' is greater than the limit for profit
  3120. or less than the stop loss, a message is generated.
  3121. }
  3122.  
  3123. stop_loss := 0;
  3124. sell_profit := 0;
  3125. if ticker = 'aapl' then
  3126.     if c > 47 then 
  3127.         sell_profit := 1;
  3128.     else
  3129.     if c < 41 then
  3130.         stop_loss := 1;
  3131. if ticker = 'gr' then
  3132.     if c > 43 then 
  3133.         sell_profit := 1;
  3134.     else
  3135.     if c < 38 then
  3136.         stop_loss := 1;
  3137. if ticker = 'la' then
  3138.     if c > 27 then 
  3139.         sell_profit := 1;
  3140.     else
  3141.     if c < 10 then
  3142.         stop_loss := 1;
  3143.  
  3144. if stop_loss = 1 then
  3145.     writeln(ticker, ' has reached your STOP LOSS limit. SELL');
  3146. if sell_profit = 1 then
  3147.     writeln(ticker, ' has reached your Profit target. SELL');
  3148. Directional Movement Example
  3149. The following script is contained in file "DM.TAS". 
  3150. NOTE : This script will only work with the REGISTERED 
  3151. VERSION of TAS.
  3152. Script Contents
  3153. #output_file 'dm.lst'
  3154. { DM.TAS
  3155. Wilder's Directional Movement Trading Example
  3156. This script will indicate
  3157. a BUY signal
  3158. if the +DI(14) crosses above -DI(14) and ADXR > 25
  3159. a SELL signal
  3160. if the -DI(14) crosses above +DI(14) and ADXR > 25
  3161. }
  3162. { declare the +DI (Positive Directional Movement array}
  3163. pdi_array : array;
  3164.  
  3165. { declare the -DI (Negative Directional Movement array}
  3166. mdi_array : array;
  3167.  
  3168. pdi_array := pdi(14);   { calculate +DI}
  3169. mdi_array := mdi(14);   { calculate -DI}
  3170. adxr_14 := adxr(14);
  3171. adx_14  = adx(14);
  3172. dx_14  = dx(14);
  3173. if first_ticker then 
  3174.     writeln('TICKER     ADXR   DX  ADX  +DI  -DI     ACTION');
  3175.  
  3176. write(ticker,'  ',int(adxr_14),
  3177.     int(dx_14),
  3178.     int(adx_14),
  3179.      int(pdi_array[0]),
  3180.     int(mdi_array[0]));
  3181. action = '';
  3182.  
  3183. if (adxr_14 > 25)   then        { AVG DX Rate of Change > 25 }
  3184. begin
  3185. if (over(pdi_array,mdi_array) = 0) then
  3186.     action = '** BUY SIGNAL';
  3187. else
  3188. if (over(mdi_array,pdi_array) = 0) then
  3189.     action = '** SELL SIGNAL';
  3190. end;
  3191. writeln(action);
  3192. Script Output
  3193. TICKER     ADXR   DX  ADX  +DI  -DI     ACTION
  3194. AA           33   28   33   25   14
  3195. ALD          22   15   22   30   22
  3196. AXP          34   59   34   39   10
  3197. T            30   41   30   29   12
  3198. BS           26   42   26   32   13
  3199. BA           22    8   22   27   23
  3200. CHV          17    4   17   27   29
  3201. KO           27   49   27   32   11
  3202. DD           21   23   21   29   18
  3203. Modified "Binary Wave" 
  3204. The file "SELCT.TAS" contains a rather lengthy script which 
  3205. contains the logic for computing a 6 point "binary wave". The 
  3206. first 4 "points" of the wave are those described in the 
  3207. "MetaStock User's Manual" in Chapter 7, section 7.7.2 "Example 
  3208. Binary Waves". 
  3209.  
  3210. The final 2 points of the "binary wave" are included to show 
  3211. how you can extend the original example to compute additional 
  3212. indicators (Chaikin's Oscillator and Commodity Channel Index) 
  3213. which are used to further refine the selection. 
  3214.  
  3215. Since the file is large, it is not included in this documentation, 
  3216. but the file is included in the TAS package. 
  3217.  
  3218. Profit Test Example Using RSI(14) 
  3219. The TAS Script file 'RSIPT.TAS' shows a Profit Test using the 
  3220. 14-day RSI.  It serves as a simple example of the kind of profit 
  3221. testing available with TAS. 
  3222. Script Contents (RSIPT.TAS)
  3223. {
  3224. RSIPT.TAS
  3225. RSI PROFIT TEST SCRIPT EXAMPLE
  3226. This script will signal a SELL when the
  3227. RSI(14) crosses under 'rsi_upper' and a BUY when
  3228. RSI(14) crosses above 'rsi_lower'.
  3229. }
  3230. #PROFIT_TEST LONG 1000          { long positions with $1000}
  3231. #MAX_QUOTES 300                 { only read in 300 quotes }
  3232. #OUTPUT_FILE 'RSIPT.LST'        { assign output listing to rsipt.lst}
  3233.  
  3234. RSI_VALUES : ARRAY;             { array containing plotted points }
  3235. RSI_UPPER := 75;                { Upper range of RSI - point to SELL
  3236. Change this if
  3237. you want to test different value}
  3238. RSI_LOWER := 50;                { Lower range of RSI - point to BUY
  3239. Change this if you want to test different value}
  3240.  
  3241. PLOT BEGIN      { This begins the "plot" of the RSI }
  3242. RSI_VALUES := RSI(14);  { COMPUTE THE RSI(14) PLOT }
  3243. END;
  3244.  
  3245. BUY WHEN RSI_VALUES[-1] < RSI_LOWER AND RSI_VALUES > 
  3246. RSI_LOWER;
  3247.  
  3248. SELL WHEN RSI_VALUES[-1] > RSI_UPPER  AND RSI_VALUES < 
  3249. RSI_UPPER;
  3250. Script Output
  3251. The following report shows the output of the Profit Tester for a 
  3252. single stock. 
  3253.                 Technical Analysis Scanner (TAS 3.64)
  3254.                 File Date  : 05/08/90
  3255.                 Run  Date  : Wed May 29 22:28:00 1991
  3256.                 Script Name: RSIPT
  3257.                 Ticker Name: T
  3258.  
  3259.             Amdahl (AMH) From 03/20/90 To 05/29/91
  3260.             Initial Cash $ 1000.00. (Long Positions Only)
  3261.         Share Purchases use All Available Cash with NO Commissions
  3262.  
  3263.                               |-----Current Trade-------| |--Cumulative--|
  3264.   Date   Action Shrs    Price Points  Cash   Comm  Profit  Points   Profit
  3265. -------- ----- ----- -------- ------ ------ ----- ------- -------  -------
  3266. 05/09/90 Buy      70   14.250  0.000      2     0       0   0.000        0
  3267. 05/22/90 Sell     70   15.625  1.375   1096     0      96   1.375       96
  3268. 06/12/90 Buy      69   15.750  0.000     10     0       0   1.375       96
  3269. 07/18/90 Sell     69   18.250  2.500   1269     0     172   3.875      269
  3270. 09/07/90 Buy      97   13.000  0.000      8     0       0   3.875      269
  3271.  
  3272.                          Summary for AMH
  3273.         |--Trades-----| |-Runs-|  Percent  |---Maximum--|         Total %
  3274.         Tot Win Los Stp  Win Los  Win Los  Profit    Loss Commn  Profit Gain
  3275. Long      2   2   0   0    2   0 100%   0%    269       0     0     269   27%
  3276. Short     0   0   0   0    0   0   0%   0%      0       0     0       0    0%
  3277. Closed    2   2   0   0    2   0 100%   0%    269       0     0     269   27%
  3278. Open      1   1   0   0    1   0 100%   0%    315       0     0     315   32%
  3279. Total     3   3   0   0    2   0 100%   0%    315       0     0     584   58%
  3280.  
  3281.  
  3282.  
  3283.                          Summary for ALL SYMBOLS
  3284.         |--Trades-----| |-Runs-|  Percent  |---Maximum--|         Total %
  3285.         Tot Win Los Stp  Win Los  Win Los  Profit    Loss Commn  Profit Gain
  3286. Long      2   2   0   0    2   0 100%   0%    269       0     0     269   27%
  3287. Short     0   0   0   0    0   0   0%   0%      0       0     0       0    0%
  3288. Closed    2   2   0   0    2   0 100%   0%    269       0     0     269   27%
  3289. Open      1   1   0   0    1   0 100%   0%    315       0     0     315   32%
  3290. Total     3   3   0   0    2   0 100%   0%    315       0     0     584   58%
  3291.  
  3292. TAS Error Message
  3293. TAS has extensive error checking features that attempt to detect 
  3294. and isolate errors as close to the source as possible. The 
  3295. following section is a list of the error messages that can be 
  3296. exhibited by TAS. 
  3297.  
  3298. For each error message, there are three sections, The first ection 
  3299. is the actual text of the message, the second section is the cause 
  3300. of the message, and the third section is the recommendation, or 
  3301. action to resolve the error. 
  3302.  
  3303. At the end of the list of error messages is a list of Diagnostic 
  3304. Actions. These are described in the error message 
  3305. recommendation as Action Dx, where the x is a diagnostic action 
  3306. number. A Diagnostic Action is a sequence of steps necessary to 
  3307. resolve the problem or to gather and provide enough 
  3308. information for resolution by FlexSoft Technical Support. 
  3309. Error Messages
  3310. '(', number value or variable expected.
  3311. Cause:
  3312. In trying to decipher an arithmetic expression, TAS found a 
  3313. sequence where it expected to find either an expression in 
  3314. parentheses, a number or a variable. It found nothing it could 
  3315. make sense of.
  3316.  
  3317. Recommendation:
  3318. Examine the line where the error was flagged and correct the 
  3319. mistake.
  3320.  
  3321. ')' expected.
  3322. Cause:
  3323. In trying to decipher an arithmetic expression, TAS found a 
  3324. sequence that is missing a right parenthesis. 
  3325. Recommendation:
  3326. Examine the line where the error was flagged and correct the 
  3327. mistake.
  3328.  
  3329. Heap Corrupted
  3330. Cause:
  3331. TAS internal error. The TAS memory 'heap' structure has 
  3332. become unusable. 
  3333. Recommendation:
  3334. Restart TAS.
  3335. Action D2
  3336.         
  3337. A <tttt> Math Error (code <cc>) has occurred
  3338. while processing symbol <ticker>
  3339. in TAS Script File <script>, line <ll>.
  3340. TAS cannot continue. Fix the problem and try again.
  3341. Cause:
  3342. The TAS script has encountered a "math" error of the type 
  3343. shown in the message text as <tttt>  while processing ticker 
  3344. name <ticker> at line <ll>. 
  3345. Recommendation:
  3346. This may be the result of faulty data in your ticker file. Verify
  3347. that the ticker data is valid (high >= close >= low), then note
  3348. the script line where the error occurred. 
  3349. Try another function on that ticker to see if the problem persists.
  3350. Action D1
  3351.  
  3352. ALPHA requires 'D','W' or 'M'
  3353. Cause:
  3354. An incorrect parameter was given to the ALPHA function. It 
  3355. must be one of the ones shown in the message.        
  3356. Recommendation:
  3357. Fix the function parameter list.
  3358.  
  3359. Argument <aa> is the wrong type for <ff> 
  3360. function. Should be <tt>
  3361. Cause:
  3362. The <aa>th argument to the function named  <ff> in the 
  3363. message was the wrong type of argument. If should have been 
  3364. an argument type as shown in <tt>. For example,  this message 
  3365. would occur if you tried to do a moving average (mov) of a 
  3366. number, rather than an array.
  3367. Recommendation:
  3368. Look at the argument number shown by the <aa> part of the 
  3369. message. Then check the function description. Make sure that 
  3370. the value passed in that argument is of the correct type.
  3371.  
  3372. Badly formed number
  3373. Cause:
  3374. An invalid number expression was found. 
  3375. Recommendation:
  3376. Fix the number in the script
  3377.  
  3378. BETA argument error
  3379. Cause:
  3380. An incorrect parameter was given to the BETA function. It must 
  3381. be 'D','W' or 'M' or no parameter at all.
  3382. Recommendation:
  3383. Fix the function parameter list.
  3384.  
  3385. BETA requires an INDEX file
  3386. Cause:
  3387. The BETA function requires an INDEX ticker file to be specified 
  3388. by a #INDEX command or in the OPTIONS MENU of 
  3389. SELECTION or PROFIT TEST BUILD. 
  3390. Recommendation:
  3391. Specify an INDEX ticker.
  3392.  
  3393. BREAK hit
  3394. Cause:
  3395. While a script was executing, you hit the CTRL-BREAK or 
  3396. CTRL-C key. The script terminates and TAS attempts to 
  3397. continue.
  3398. Note that hitting the BREAK key is not a graceful way to stop a 
  3399. running script and you may have to restart TAS afterwards. 
  3400. Recommendation:
  3401. Wait until the script finishes or use a smaller ticker list.
  3402.  
  3403. Cannot sort on type given
  3404. Cause:
  3405. A SORTOUT function was called, but one of the parameters is 
  3406. not 'sortable'. For example, you cannot sort on a variable into 
  3407. which you have not assigned a value. Until you assign a value 
  3408. to it, TAS does not know what kind of variable it is, number, 
  3409. string or  array.
  3410. Recommendation:
  3411. Examine your script to be sure you are assigning a value to the 
  3412. argument you are passing to the SORTOUT function.
  3413.  
  3414. Constant string too long
  3415. Cause:
  3416. You have a constant string (a literal value enclosed in single 
  3417. quotes) that is longer than 128 characters. This may be caused 
  3418. by forgetting to terminate a quoted string on a prior line.
  3419. Recommendation:
  3420. Examine the script and add any missing single quotes. Break up 
  3421. the constant into two or more pieces if necessary.
  3422.  
  3423. Could not create window. Error <e>
  3424. Cause:
  3425. TAS internal window error.
  3426. Recommendation:
  3427. Action D2
  3428.  
  3429. Not enough storage. Decrease MAX_QUOTES
  3430. Cause:
  3431. You have specified too high a value for MAXIMUM QUOTES in 
  3432. the TAS CONFIGURATION screen. Reduce this value so that 
  3433. TAS can load all the necessary data for a ticker.
  3434. Recommendation:
  3435. If you are doing a profit test, you can use the START DATE and 
  3436. END DATE options to reduce the number of quotes TAS reads 
  3437. for each ticker.
  3438.  
  3439. EMS Memory overflow
  3440. Cause:
  3441. Not applicable to TAS at this time.
  3442. Recommendation:
  3443. None.
  3444. Error creating ticker file :
  3445. Cause:
  3446. TAS could not create the ticker file.
  3447. Recommendation:
  3448. Check that the directory in which you are writing the ticker file 
  3449. exists and that the file, if it exists, is not READ ONLY.
  3450.  
  3451. Error occurred during process of <ssss>
  3452. Cause:
  3453. An error occurred while running SELECTION <ssss>. There 
  3454. might be a message to explain it prior to this point.
  3455. Recommendation:
  3456. Run the .SEL file again and watch for any other error messages.
  3457.  
  3458. Error: not enough heap space in save_screen()
  3459. Cause:
  3460. TAS internal error.
  3461. Recommendation:
  3462. Action D2
  3463.  
  3464. Error: not enough heap space in restore_screen()
  3465. Cause:
  3466. TAS internal error.
  3467. Recommendation:
  3468. Action D2
  3469.  
  3470. expected assignment ':='
  3471. Cause:
  3472. The script has a syntax error in it. Probably there is a sequence 
  3473. like 
  3474. A B
  3475.  where A and B are variables. TAS expects an assignment to 
  3476. variable A.
  3477. Recommendation:
  3478. Examine the script and fix the error.
  3479.  
  3480. Expected LONG or SHORT
  3481. Cause:
  3482. A Profit Test STOP statement was found but it was not followed 
  3483. by the type of stop, either LONG or SHORT.
  3484. Recommendation:
  3485. Examine the script and fix the error.
  3486.  
  3487. Expected WHEN
  3488. Cause:
  3489. A Profit Test BUY, SELL or STOP statement was found but it 
  3490. was ot  followed by the word WHEN.
  3491. Recommendation:
  3492. Examine the script and fix the error.
  3493.  
  3494. GOTO LABEL not defined
  3495. Cause:
  3496. A GOTO statement names a label that is not defined in the 
  3497. script. 
  3498. For example, it says GOTO ABC, but there is no label ":ABC" in 
  3499. the script.
  3500. Recommendation:
  3501. Examine the script and fix the error.
  3502.  
  3503. GRAPHS not registered
  3504. Cause:
  3505. An OPENGRAPH function was called for the third time when 
  3506. the GRAPH feature is not registered. No more graphs can be 
  3507. run until TAS is restarted.
  3508. Recommendation:
  3509. Register the GRAPH feature.
  3510.  
  3511. Incorrect argument count to <ff> function
  3512. Cause:
  3513. The function <ff> was called with more or less arguments than 
  3514. it requires. 
  3515. Recommendation:
  3516. Refer to the function description for the correct number and 
  3517. type of arguments (parameters).
  3518.  
  3519. Incorrect # of parameters for SORTGET
  3520. Cause:
  3521. The number of parameters to the SORTGET function does not 
  3522. match the number of arguments passed to the SORTOUT 
  3523. function. There must be a one for one relationship between the 
  3524. argument counts for both functions.
  3525. Recommendation:
  3526. Examine the script and fix the error.
  3527.  
  3528. Incorrect SIZEGRAPH
  3529. Cause:
  3530. The number of parameters to the SIZEGRAPH function must be 
  3531. equal to the number of graphs specified in the preceding 
  3532. OPENGRAPH function.
  3533. Recommendation:
  3534. Examine the script and fix the error.
  3535.  
  3536. Incorrect ZigZag type
  3537. Cause:
  3538. The third parameter to the ZIG function must be either '%' or '$'.
  3539. Recommendation:
  3540. Examine the script and fix the error.
  3541.  
  3542. Incorrect 'type' parameter to pt_init
  3543. Cause:
  3544. The PT_INIT function was called with an incorrect 'type' field.
  3545. Recommendation:
  3546. Examine the script and fix the error.
  3547.  
  3548. Incorrect Graph Type
  3549. Cause:
  3550. The GRAPH function was called with an incorrect type of item 
  3551. to graph. See the  graph function for the valid types of graph. .
  3552. Recommendation:
  3553. Examine the script and fix the error.
  3554.  
  3555. Incorrect Start/End
  3556. Cause:
  3557. An OPENGRAPH function was called with the start and end 
  3558. array indices specified, but 1) the start was later than the end or 
  3559. (2)one of the specifications was not a number.
  3560. Recommendation:
  3561. Examine the script and fix the error.
  3562.  
  3563. Incorrect OPENGRAPH
  3564. Cause:
  3565. The OPENGRAPH function was called with an incorrect 
  3566. number of parameters. 
  3567. Recommendation:
  3568. Examine the script and fix the error.
  3569.  
  3570. Incorrect DRAWLINE parameters
  3571. Cause:
  3572. The DRAWLINE function was called with an incorrect number 
  3573. of parameters. 
  3574. Recommendation:
  3575. Examine the script and fix the error.
  3576.  
  3577. Incorrect placement of # command
  3578. Cause:
  3579. A # symbol was found in some column other than the first 
  3580. column of a line. 
  3581. The # symbol is used to distinguish "Pound" commands from 
  3582. other parts of the script. It cannot be used in any other context 
  3583. (except as part of a string).
  3584. Recommendation:
  3585. Check that the "Pound" Command begins in the first column of 
  3586. the line.
  3587.  
  3588. Intermediate operand stack overflow
  3589. Cause:
  3590. This can be caused by a TAS internal error or a very complex 
  3591. expression in a script.  
  3592. Recommendation:
  3593. If the error occurs in a statement containing a complex algebraic 
  3594. expression, try breaking the expression into smaller pieces. For
  3595. example, if the statement is
  3596.         A = (B+5)*(C+2/(1+C))
  3597. you might break it into
  3598.         A1 = B + 5
  3599.         A2 = C+2/(1+C)
  3600.         A = A1 * A2
  3601. If the problem does not occur on a complex statement, then 
  3602. see ACTION D2.        
  3603.  
  3604. Intermediate array stack underflow
  3605. Cause:
  3606. TAS internal error.
  3607. Recommendation:
  3608. Action D1
  3609.  
  3610. Intermediate operand stack underflow
  3611. Cause:
  3612. TAS internal error.
  3613. Recommendation:
  3614. Action D1
  3615.  
  3616. internal flag error in check_types
  3617. Cause:
  3618. TAS internal error.
  3619. Recommendation:
  3620. Action D1
  3621.  
  3622. internal flag error in check_types
  3623. Cause:
  3624. TAS internal error.
  3625. Recommendation:
  3626. Action D1
  3627.  
  3628. Invalid 3rd parameter to mov()
  3629. Cause:
  3630. An incorrect third parameter was given in a MOV function call.
  3631. Recommendation:
  3632. Examine the script and fix the error.
  3633.  
  3634. Invalid argument to pt_price
  3635. Cause:
  3636. An incorrect parameter was given in a PT_PRICE function call.
  3637. Recommendation:
  3638. Examine the script and fix the error.
  3639.  
  3640. Invalid array subscript
  3641. Cause:
  3642. A reference was made to an array element that is outside the 
  3643. range of quotes in the ticker file. For example, if 200 days were 
  3644. loaded, and a reference is made to C[202] or C[-301]. 
  3645. Recommendation:
  3646. Examine the script and fix the error.
  3647.  
  3648. Invalid character
  3649. Cause:
  3650. Some character not in the TAS character set was encountered 
  3651. outside of a string constant (anything between single quotes is 
  3652. allowed). 
  3653. Recommendation:
  3654. Examine the script and fix the error.
  3655.  
  3656. INVALID KEYWORD 'wwww'
  3657. Cause:
  3658. A keyword in the TAS.CNF file was not recognized.
  3659. Recommendation:
  3660. Remove the line with the word 'wwww' from the TAS.CNF file.
  3661.  
  3662. Invalid operator
  3663. Cause:
  3664. TAS internal error.
  3665. Recommendation:
  3666. Action D1
  3667.  
  3668. Invalid option to LOAD
  3669. Cause:
  3670. A LOAD function was given an invalid data array name in the 
  3671. second parameter.
  3672. Recommendation:
  3673. Examine the script and fix the error.
  3674.  
  3675.  
  3676. Invalid SEL file
  3677. Cause:
  3678. In the SELECTION BUILD section, a .SEL file was loaded, but 
  3679. TAS was not able to recognize it as a valid .SEL file. 
  3680. Recommendation:
  3681. Make sure that the .SEL file has not been modified by some 
  3682. means other than TAS SELECTION BUILD.
  3683.  
  3684. Invalid string function
  3685. Cause:
  3686. TAS internal error.
  3687. Recommendation:
  3688. Action D1
  3689.  
  3690. INVALID VALUE for <vvvv>
  3691. Cause:
  3692. A keyword in the TAS.CNF file has an invalid value.
  3693. Recommendation:
  3694. Remove the line with the word 'vvvv' from the TAS.CNF file 
  3695. and reconfigure TAS.
  3696.  
  3697. KEYWORD '<vvvv>' HAS NO VALUE
  3698. Cause:
  3699. A keyword in the TAS.CNF file has an no value.
  3700. Recommendation:
  3701. Remove the line with the word 'vvvv' from the TAS.CNF file
  3702. and reconfigure TAS.
  3703.  
  3704. LABEL name expected
  3705. Cause:
  3706. A GOTO statement was not followed by the LABEL to 'go to'
  3707. Recommendation:
  3708. Examine the script and fix the error.
  3709.  
  3710. LOAD not supported for CHARTPRO
  3711. Cause:
  3712. The LOAD function is not supported for the ChartPro data 
  3713. format.
  3714. Recommendation:
  3715. None.
  3716.  
  3717. Missing function argument list
  3718. Cause:
  3719. A function name was not immediately followed by  a left 
  3720. parenthesis, an optional argument list, and then a right 
  3721. parenthesis. Even a function that  has no arguments must be 
  3722. followed by at least '()'.
  3723. Recommendation:
  3724. Examine the script and fix the error. Make sure there are no 
  3725. blanks or other characters between the function name and the 
  3726. left parenthesis. 
  3727. If you have inadvertantly used the name of a function for a 
  3728. variable name, then you should change the name of the 
  3729. variable.
  3730.  
  3731. MSP_FILE_SEEK - error in direction
  3732. Cause:
  3733. TAS internal error.
  3734. Recommendation:
  3735. Action D1
  3736.  
  3737. MSP_FILE_SEEK
  3738. Cause:
  3739. TAS internal error.
  3740. Recommendation:
  3741. Action D1
  3742.  
  3743. MSP_MASTER_SEEK - error in direction
  3744. Cause:
  3745. TAS internal error.
  3746. Recommendation:
  3747. Action D1
  3748.  
  3749. MSP_MASTER_SEEK
  3750. Cause:
  3751. TAS internal error.
  3752. Recommendation:
  3753. Action D1
  3754.  
  3755. Nesting level too deep
  3756. Cause:
  3757. This message occurs when 20 BEGIN statements occur without 
  3758. an intervening END statement.
  3759. Recommendation:
  3760. Look for missing END statements or simplify the nesting 
  3761. structure of the statements leading up to the error.
  3762.  
  3763. No more internal array storage
  3764. Cause:
  3765. TAS is out of memory and cannot perform any more 
  3766. calculations. This can be caused by too high a value for 
  3767. MAXIMUM QUOTES PER SYMBOL or by the use of too many 
  3768. permanent  ARRAYS (those variables declared with " : ARRAY" 
  3769. in a script).
  3770. Recommendation:
  3771. Action D4
  3772.  
  3773. No Syntax Errors in this script. Congratulations!
  3774. Cause:
  3775. This message is produced when a SYNTAX CHECK is done 
  3776. from within the TAS Editor. The script has no errors that can be 
  3777. found by examining the "syntax" of the script. In other words, 
  3778. there are no invalid symbols, GOTO's without labels, bad 
  3779. characters, and other errors that violate the syntax rules of a 
  3780. TAS script. 
  3781. On the other hand, there may still be errors in the script that can 
  3782. only be detected by  actually running the script. These errors 
  3783. might be logical errors, memory errors, math errors or function 
  3784. parameter errors. 
  3785. Recommendation:
  3786. Run the script, since it seems to be correct at this time.
  3787.  
  3788. Not enough Data Arrays
  3789. Cause:
  3790. Internal Error. EMS version of TAS only
  3791. Recommendation:
  3792. Action D1
  3793.  
  3794. Not enough storage. Decrease MAX_QUOTES
  3795. Cause:
  3796. TAS is out of memory and cannot perform any more 
  3797. calculations. This can be caused by too high a value for 
  3798. MAXIMUM QUOTES PER SYMBOL or by the use of too many 
  3799. permanent  ARRAYS (those variables declared with " : ARRAY" 
  3800. in a script).
  3801.  
  3802. Recommendation:
  3803. Action D4
  3804.  
  3805. Not enough memory available for symbol table
  3806. Cause:
  3807. The script is too large to run with the current setting of 
  3808. SYMBOL TABLE SIZE. The Symbol Table is used to keep the 
  3809. "run time machine language" version of the script while it is 
  3810. executing. If the CONFIGURATION SCREEN setting for 
  3811. SYMBOL TABLE SIZE is
  3812. too low, there is not enough room to build the run time script. 
  3813. Recommendation:
  3814. Action D3
  3815.  
  3816. Not supported in TRIAL version
  3817. Cause:
  3818. The script is using a function or feature that is not part of the 
  3819. TRIAL (or evaluation) version of TAS. The function or feature is 
  3820. enabled after TAS is registered.
  3821.  
  3822. Recommendation:
  3823. Register TAS and obtain a Registration Code.
  3824.  
  3825. operand stack overflow
  3826. Cause:
  3827. This can be caused by a TAS internal error or a very complex 
  3828. expression in a script.  
  3829. Recommendation:
  3830. If the error occurs in a statement containing a complex algebraic 
  3831. expression, try breaking the expression into smaller pieces. For
  3832. example, if the statement is
  3833.         A = (B+5)*(C+2/(1+C))
  3834. you might break it into
  3835.         A1 = B + 5
  3836.         A2 = C+2/(1+C)
  3837.         A = A1 * A2
  3838. If the problem does not occur on a complex statement, then 
  3839. see ACTION D2.        
  3840.  
  3841. operand stack underflow
  3842. Cause:
  3843. TAS internal error.
  3844. Recommendation:
  3845. Action D2
  3846.  
  3847. <filename> read error
  3848. Cause:
  3849. TAS could not read the Metastock or Chartpro file named 
  3850. <filename>
  3851. Recommendation:
  3852. Verify that the data file is correct and readable. If not, correct it.
  3853. If it is correctable, see Action D1
  3854.  
  3855. Right Brace (]) missing
  3856. Cause:
  3857. A subscript after an array was not followed by a Right Brace ']'. 
  3858. For example,
  3859.     A = B[-3;
  3860. would produce this error.
  3861. Recommendation:
  3862. Examine the script and fix the error.
  3863.  
  3864. script terminated
  3865. Cause:
  3866. The script has completed for some reason indicated in a prior 
  3867. message, such as "BREAK HIT".
  3868. Recommendation:
  3869. None.
  3870.  
  3871. semi-colon expected after ARRAY
  3872. Cause:
  3873. A script statement declaring an ARRAY was not terminated by 
  3874. a semi-colon. For example,
  3875.     B : ARRAY
  3876. would cause this error.
  3877. Recommendation:
  3878. Examine the script and fix the error.
  3879.  
  3880.  
  3881. semi-colon expected after NUMBER
  3882. Cause:
  3883. A script statement declaring a NUMBER was not terminated by 
  3884. a semi-colon. For example,
  3885.     B : NUMBER
  3886. would cause this error.
  3887. Recommendation:
  3888. Examine the script and fix the error.
  3889.  
  3890. sorton : Incorrect column number
  3891. Cause:
  3892. The SORTON function was called with a column number that is 
  3893. not valid. The only valid column numbers are from 1 to the 
  3894. number of parameters in the prior SORTOUT function(s).
  3895. Recommendation:
  3896. Examine the script and fix the error.
  3897.  
  3898. sorton: Incorrect direction
  3899. Cause:
  3900. The SORTON function was called with a direction that was 
  3901. neither 'A' for ascending, or 'D' for descending.
  3902. Recommendation:
  3903. Examine the script and fix the error.
  3904.  
  3905. sortout : cannot allocate sort storage
  3906. Cause:
  3907. When a SORTOUT function was executed, there was not 
  3908. enough memory left to create a sort buffer equal to F*T*4+(S*L), 
  3909.     where 
  3910. F = number of fields in the SORTOUT function call
  3911. T = number of tickers in the ticker list
  3912. S = number of fields in the SORTOUT function call that are 
  3913. strings
  3914. L = average length of the string constants
  3915.  
  3916. Recommendation:
  3917. Action D4
  3918.  
  3919. Still can't handle those Chartpro dates
  3920. Cause:
  3921. TAS internal error. Chartpro dates are not computing correctly.
  3922. Recommendation:
  3923. Action D1
  3924.  
  3925. Symbol Overflow. Increase SYMBOL TABLE SIZE
  3926. Cause:
  3927. The script is too large to run with the current setting of 
  3928. SYMBOL TABLE SIZE. The Symbol Table is used to keep the 
  3929. "run time machine language" version of the script while it is 
  3930. executing. If the CONFIGURATION SCREEN setting for 
  3931. SYMBOL TABLE SIZE is
  3932. too low, there is not enough room to build the run time script. 
  3933. Recommendation:
  3934. Action D3
  3935.  
  3936.  
  3937. TAS error code <ccc>
  3938. Cause:
  3939. TAS ended with an error. There was a prior message explaining 
  3940. the type of error. The code <ccc> is a code internal to TAS. 
  3941.  
  3942. Recommendation:
  3943. If the problem persists,record the code <ccc>.
  3944. Then perform Action D1
  3945.  
  3946. TAS Profit Test ended with error <ccc>
  3947. Cause:
  3948. TAS Profit Test ended with an error. There was a prior message 
  3949. explaining the type of error. The code <ccc> is a code internal to 
  3950. TAS. 
  3951.  
  3952. Recommendation:
  3953. If the problem persists,record the code <ccc>.
  3954. Then perform Action D1
  3955.  
  3956. Temporary result released out of order
  3957. Cause:
  3958. TAS internal error.
  3959. Recommendation:
  3960. Action D1
  3961.  
  3962. Temporary array released out of order
  3963. Cause:
  3964. TAS internal error.
  3965. Recommendation:
  3966. Action D1
  3967.  
  3968. Too many arrays declared
  3969. Cause:
  3970. More than the maximum number of permanent arrays were 
  3971. declared (with the ":ARRAY")  declaration. The maximum 
  3972. number of permanent arrays is 26.
  3973. Recommendation:
  3974. Reuse some of the permanent arrays for other uses. For 
  3975. example, if you had an array that held a moving average and an 
  3976. array that held a stochastic oscillator, you might use the same 
  3977. array for both (at different times in the script, of course).  
  3978. Alternatively, you could just recompute the value rather than 
  3979. putting the result in an array.
  3980.  
  3981. Too many END statements
  3982. Cause:
  3983. The number of END statements is greater than the number of 
  3984. BEGIN statements.
  3985. Recommendation:
  3986. Examine the script and fix the error.
  3987.  
  3988. Too many GRAPHs requested
  3989. Cause:
  3990. An OPENGRAPH function specified less graphs than the 
  3991. number of GRAPH functions which follow it.
  3992. Recommendation:
  3993. Examine the script and fix the error.
  3994.  
  3995. Too many IF-ELSE or GOTO statements.
  3996. Cause:
  3997. TAS has run out of room to hold all of the IF-ELSE and GOTO 
  3998. labels. 
  3999. Recommendation:
  4000. Simplify the script by removing or combining IF-ELSE 
  4001. statements.
  4002.  
  4003. Too many intermediate arrays needed
  4004. Cause:
  4005. A "nested" function call is too complex for TAS to handle. This 
  4006. type of call is a function that calls a function that calls a 
  4007. function....etc. 
  4008. For example, 
  4009.     A = MOV(MOV(MOV(ROC(C,12,'%'),21,'E'),21,'E'),21,'E')
  4010. is a "nested" function call. For each of the internal function calls, 
  4011. TAS has to create an "intermediate" array. TAS has between 5 
  4012. and 12 of these arrays available depending on the value of 
  4013. MAXIMUM QUOTES PER SYMBOL.
  4014.  
  4015. Recommendation:
  4016. Use permanent arrays (named arrays declared with ":ARRAY") 
  4017. to hold intermediate results.
  4018.  or
  4019. Action D4
  4020.  
  4021. Too many parameters for function WRITE
  4022. Cause:
  4023. The WRITE and WRITELN functions can accept up to 40 
  4024. parameters. This is caused by exceeding that number.
  4025. Recommendation:
  4026. Break the WRITELN into a WRITE followed by a WRITELN 
  4027. with half the parameters in each function call.
  4028.  
  4029. Too many parameters for DUMP_ARRAY
  4030. Cause:
  4031. The DUMP_ARRAY function can accept up to 12 parameters. 
  4032. This is caused by exceeding that number.
  4033. Recommendation:
  4034. Use less parameters for DUMP_ARRAY.
  4035.  
  4036. Too many parameters for function SORTOUT
  4037. Cause:
  4038. The SORTOUT function can accept up to 40 parameters. This is 
  4039. caused by exceeding that number.
  4040. Recommendation:
  4041. Use less parameters for SORTOUT.
  4042.  
  4043. Too many RETURN stmts
  4044. Cause:
  4045. TAS has encountered a RETURN statement for which there is 
  4046. no GOSUB or script entry. Every script is run with an "implied" 
  4047. GOSUB, so one RETURN can always be used.
  4048. Recommendation:
  4049. Examine the script and fix the error.
  4050.  
  4051. Too many subroutine calls
  4052. Cause:
  4053. The maximum number of GOSUB statements has been 
  4054. executed. If a script does a GOSUB to a subroutine that does a 
  4055. GOSUB to another subroutine, etc, the number of these 
  4056. GOSUBs without intervening RETURN statements is 40.
  4057. Recommendation:
  4058. Examine the script and fix the error.
  4059. If the script is not in error, for example, subroutine A calling 
  4060. subroutine B which calls subroutine A again, then simplify the 
  4061. subroutine nesting.
  4062.  
  4063. Too many statements to compile procedure.
  4064. Cause:
  4065. The TAS script is too large for TAS to handle. The maximum 
  4066. sized script can be over 1000 lines of instructions (comments not 
  4067. included), so this script is "too large". 
  4068. Recommendation:
  4069. Reduce the size of the script by breaking it into smaller scripts.
  4070.  
  4071. Unknown word or placement of word
  4072. Cause:
  4073. In the process of checking a script for syntax errors, TAS 
  4074. encountered a word that it did not recognize in the location it 
  4075. found it. 
  4076. Recommendation:
  4077. Examine the script and fix the error.
  4078.  
  4079.  
  4080.  
  4081. Diagnostic Actions
  4082. Action D1
  4083. 1.     Create a MSP or Chartpro directory containing the 
  4084. ticker file in which the error was discovered (in the case 
  4085. of Metastock, you can do this with the COPY 
  4086. SECURITY command.
  4087. 2.     Copy the script in error to the directory you created in 
  4088. step 1
  4089. 3.     Copy the ticker list used when the error occurred to the 
  4090. directory created in step 1.
  4091. 4.     Use PKZIP or LHARC to compress the files in the 
  4092. directory created in step 1.
  4093. 5.     Upload the file to the FlexSoft BBS AREA J
  4094.  
  4095. Action D2      
  4096. Record the sequence of commands and actions performed up to 
  4097. the point where the problem occurs as well as the script used. 
  4098. Report the problem to FlexSoft.
  4099.  
  4100. Action D3
  4101.  
  4102. 1.    Increase SYMBOL TABLE SIZE setting in the 
  4103. CONFIGURATION SCREEN. As a good start, double 
  4104. it. 
  4105. 2.    Then run the script that caused the error. 
  4106. 3.     After the script completes, type the ALT-M key while in 
  4107. a TAS menu and record the value of Maximum Symbol 
  4108. Table Size. This is the amount of Symbol Table the 
  4109. script actually used. 
  4110. 4.    Go back to the CONFIGURATION SCREEN and lower 
  4111. the SYMBOL TABLE SIZE to be a couple of thousand 
  4112. more than the maximum value used. 
  4113. Under no circumstances should you increase the Symbol 
  4114. Table size above 32,000.
  4115. If increasing the SYMBOL TABLE SIZE leads to other out of 
  4116. memory errors, you may have to reduce the MAXIMUM 
  4117. QUOTES PER SYMBOL setting on the CONFIGURATION 
  4118. SCREEN.
  4119.         
  4120. Action D4
  4121. 1.    Remove any unneeded TSRs.
  4122. 2.    Reduce MAXIMUM QUOTES PER SYMBOL in the 
  4123. CONFIGURATION SCREEN.
  4124. 3.    Reuse permanent arrays when they are no longer 
  4125. needed.
  4126. Index
  4127. "
  4128. ".PRO", 16
  4129. "batch mode", 12
  4130. "context sensitive help" t "See HELP Key", 14
  4131. "MASTER", 16
  4132. "periods", 16
  4133. "REGISTRATION CODE", 4
  4134. "tuning", 17
  4135. "updates to TAS" t "see new version of TAS", 6
  4136. "upgrade releases", 5
  4137. A
  4138. ALT-M key, 14
  4139. ALT-X key, 14
  4140. angle(a), 62
  4141. argument, 106,107,110,113,115
  4142. ARRAY, 43,45,65,77,78,96,102,117,118,120,122,123,124
  4143. array, 
  4144. 22,29,41,42,43,44,45,48,53,54,55,57,58,59,60,61,62,63,64,65,66,67,6
  4145. 8,69,73,77,78,79,80,84,92,93,95,96,99,100,102,106,107,111,112,113,
  4146. 114,117,118,119,120,122,123,124
  4147. B
  4148. back test: see Profit Test, 1
  4149. bbandt(p,s), 63
  4150. BEGIN..END, 47,49,77
  4151. beta, 4,63,106
  4152. black box" system, 1
  4153. C
  4154. CASH, 26,27,29,103
  4155. ChartPro, 1,3,7,14,15,16,20,60,115
  4156. color, 12,84,85,87
  4157. companion products, 5
  4158. Compuserve, 5,6
  4159. Computrac, 3
  4160. Configuration and Setup, 14
  4161. Configuration Menu, 14
  4162. Configuring TAS, 14-19
  4163. CTRL-BRK, 14
  4164. D
  4165. DAILY data, 16
  4166. DATA DIRECTORY(S), 15
  4167. DATAPATH, 53
  4168. date, 22,26,29,35,48,53,64,65,67,69,74,91,92,103,108
  4169. decimal point, 41,65,71,75
  4170. DEFINE TICKER LIST, 19
  4171. diagnostic, 104,125
  4172. DowJones, 5
  4173. E
  4174. EMA, 53,95,96
  4175. EMS, 15,17,18,108,117
  4176. END PHASE, 81
  4177. English, 40
  4178. ENTER, 6,9,10,11,15,19,21,23,25,26,30,32,33
  4179. ESC key, 9,11,14
  4180. expression, 39,44,45,46,52,78,79,104,105,106,112,118
  4181. F
  4182. F1 key, 14
  4183. FIRST_TICKER, 53,75,76,97,100
  4184. FlexSoft address, 5
  4185. FlexSoft BBS, 6
  4186. format string, 75
  4187. FULLNAME, 53,71
  4188. function, 
  4189. 10,21,26,31,32,39,40,44,45,53,57,58,61,62,63,64,65,66,67,68,69,71,7
  4190. 2,73,74,81,83,84,85,105,106,107,110,111,113,114,115,116,117,118,1
  4191. 20,121,123,124
  4192. G
  4193. GEnie, 5,6,7
  4194. GOSUB, 49,50,51,124,125
  4195. GOTO, 48,49,109,115,123
  4196. graph, 60,65,82,83,84,85,86,87,110,111,123
  4197. H
  4198. hardware configuration, 3
  4199. heap, 105,108
  4200. HELP Key, 9,14,26,31,33
  4201. historical data, 1
  4202. I
  4203. INCLUDE TICKER PERIOD, 16
  4204. INDEX, 22,55
  4205. index, 53
  4206. INDEX Command, 92
  4207. Installation of TAS, 9-10; Sample Selection, 10-11
  4208. integer, 41,65,71,74,75
  4209. intermixing directories, 16
  4210. L
  4211. LAST_TICKER, 53,72
  4212. linear regression, 61,63,64,65,66
  4213. LONG, 7,17,25,26,27,79,80,81,92,102,103,107,109
  4214. long or complex script, 17
  4215. M
  4216. MAX_QUOTES, 35,90,92,93,102,107,117
  4217. MAXIMUM QUOTES, 22,90,108,117,123,126
  4218. maximum value of an "integer" field, 75
  4219. memory, 3,14,17,105,108,117,118,121,126
  4220. memory - minimum, 3
  4221. Metastock, 14,15,16
  4222. MetaStock data files, 5
  4223. MetaStock Pro "Custom Formulas", 1
  4224. MetaStock Professional, 7
  4225. MONEY, 26,27,29,67,92
  4226. monitor, 3
  4227. Monochrome, 12
  4228. more than 10 Metastock directories, 16
  4229. mouse, 3,10,11,19,30
  4230. N
  4231. nested, 123
  4232. New Line, 71,75
  4233. New Ticker List See DEFINE TICKER LIST, 19
  4234. new version of TAS, 6
  4235. number, 
  4236. 11,17,22,23,26,28,32,35,41,51,53,55,57,58,60,61,64,65,66,67,71,73,7
  4237. 4,75,76,83,84,90,104,106,107,108,110,111,120,121,122,123,124,125
  4238. numeric array, 41,45
  4239. O
  4240. Old Ticker List See DEFINE TICKER LIST, 19
  4241. OPTION SETTINGS, 26
  4242. OUTPUT_FILE, 89,90,102
  4243. P
  4244. P, 23,53,57,58,60,61,63,67,81
  4245. parameter, 
  4246. 16,17,32,57,62,66,67,69,73,75,81,84,105,106,110,111,113,114,117
  4247. PDL, 5
  4248. permanent arrays, 122,123,126
  4249. PLOT PHASE, 81,82
  4250. PML, 5
  4251. POUND, 89
  4252. POUND commands, 89
  4253. Prodigy, 5,7
  4254. profit test, 22,25,27,28,29,77,78,81,92,108
  4255. Profit Testing, 1
  4256. PROFIT_TEST, 92
  4257. Q
  4258. QUOTE_COUNT, 51,53
  4259. QUOTE_RANGE, 53
  4260. QUOTES PER SYMBOL, 17; processing time, 17
  4261. R
  4262. Rank, 10,11,20
  4263. real number, 41
  4264. Redistribution of TAS, 7
  4265. REGISTER.DOC, 5,19
  4266. REGISTRATION CODE, 18; encrypted code, 19
  4267. Registration Code, 5
  4268. Registration Fee, 5
  4269. registration fee, 3
  4270. Running TAS, 13-14
  4271. running TAS from a batch file, 4
  4272. S
  4273. SCAN_DATE, 91
  4274. semi-colon, 37,46,47,89,120
  4275. SHORT, 5,6,25,27,74,79,81,92,103,109
  4276. software configuration, 3
  4277. sort buffer, 72,73,74,121
  4278. Starting TAS, 11-12
  4279. Statement, 
  4280. 37,38,39,41,44,46,47,48,49,50,51,76,77,78,79,86,87,93,96,109,112,11
  4281. 5,116,118,119,120,124
  4282. string constant, 74,113
  4283. subroutine, 49,51,124,125
  4284. subscript, 43,113,119
  4285. support, 6
  4286. support for TAS, 4
  4287. Suppressing TAS Report Heading, 90
  4288. switches: See Starting TAS, 11
  4289. SYMBOL TABLE SIZE, 17,118,121,126
  4290. syntax, 24,32,37,109,117,125
  4291. SYNTAX CHECK, 24,117
  4292. T
  4293. Tab, 26,71
  4294. TAS Editor, 117
  4295. TAS Main Menu, 13
  4296. TAS.CNF, 16
  4297. Technical Analysis References, 8
  4298. TEST PHASE, 81,82
  4299. TICKER LIST, 4,19,23,35
  4300. TICKER LISTS, 16
  4301. trading rules, 2
  4302. TRIAL version, 4
  4303. TSRs, 126
  4304. U
  4305. Upgrade Registration Fee, 5
  4306. V
  4307. variable, 
  4308. 40,41,42,43,44,45,53,54,55,64,67,71,74,75,81,82,95,96,104,107,109,1
  4309. 16
  4310. video flags, 12
  4311. W
  4312. warranty, 7
  4313. WEEKLY data, 16
  4314. Wilder, 8
  4315. Y
  4316. yesterday, 44,65,96
  4317.  
  4318.      Most systems today do not actually have EMS memory., but instead have 
  4319. Extended Memory (XMS), the kind that is built-in to new 386 and 486 systems. 
  4320. The term EMS actually refers to a software/hardware standard that is 
  4321. emulated by driver programs from various vendors, such as QuarterDeck 
  4322. Office Systems (QEMM and DesqView/386) as well as Microsoft's EMM386 
  4323. program.     
  4324.       TAS will also accept a simple "equal" sign in lieu of the "colon-equal" sequence 
  4325. of characters for an assignment statement.
  4326.  
  4327.  
  4328.  
  4329. September 14, 1991        FlexSoft 1990-1991        
  4330.  
  4331. Table of Contents
  4332.  
  4333. Page xx     
  4334.  
  4335. Page xix
  4336.  
  4337.  
  4338.  
  4339. TAS Error Message
  4340.  
  4341. Index
  4342.  
  4343. Page 126         TAS
  4344.  
  4345. TAS         Page 5    
  4346.  
  4347. TAS         Page 127    
  4348.  
  4349.  
  4350.